{"id":6958,"date":"2026-05-16T18:34:29","date_gmt":"2026-05-16T21:34:29","guid":{"rendered":"https:\/\/helpsysadmin.com.br\/blog\/?p=6958"},"modified":"2026-05-16T19:57:29","modified_gmt":"2026-05-16T22:57:29","slug":"otimizar-disco-vps-linux","status":"publish","type":"post","link":"https:\/\/helpsysadmin.com.br\/blog\/otimizar-disco-vps-linux\/","title":{"rendered":"Como Otimizar Disco em VPS Linux: Guia Completo 2026"},"content":{"rendered":"<div id=\"helps-2369500163\" class=\"helps-before-content-2 helps-entity-placement\"><script async src=\"https:\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js?client=ca-pub-3661896953164277\"\r\n     crossorigin=\"anonymous\"><\/script>\r\n<!-- 2anuncios display quadrado -->\r\n<ins class=\"adsbygoogle\"\r\n     style=\"display:block\"\r\n     data-ad-client=\"ca-pub-3661896953164277\"\r\n     data-ad-slot=\"5051229894\"\r\n     data-ad-format=\"auto\"\r\n     data-full-width-responsive=\"true\"><\/ins>\r\n<script>\r\n     (adsbygoogle = window.adsbygoogle || []).push({});\r\n<\/script><\/div>\n<p class=\"wp-block-paragraph\">Manter o espa\u00e7o em disco bem gerenciado \u00e9 uma das tarefas mais cr\u00edticas para quem administra um servidor. Quando o disco enche, servi\u00e7os caem, logs param de ser gravados e o desempenho cai drasticamente. Neste guia completo, voc\u00ea vai aprender como <strong>otimizar o disco em VPS <a href=\"https:\/\/helpsysadmin.com.br\/blog\/como-instalar-crowdsec\/\" data-internallinksmanager029f6b8e52c=\"1\" title=\"Como instalar Crowdsec\" target=\"_blank\" rel=\"noopener\">Linux<\/a><\/strong> de forma eficaz, usando comandos nativos e boas pr\u00e1ticas que funcionam em qualquer distribui\u00e7\u00e3o \u2014 Ubuntu, Debian, CentOS, Rocky Linux ou Almalinux.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Problemas de disco podem degradar completamente a performance do servidor. Para entender a otimiza\u00e7\u00e3o completa do ambiente, veja o guia de <strong><a href=\"https:\/\/helpsysadmin.com.br\/blog\/otimizar-vps-servidor-dedicado-cloud\/\" target=\"_blank\" rel=\"noreferrer noopener\">otimizar VPS, servidor dedicado e cloud<\/a><\/strong>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-parte-1-diagnostico-entendendo-o-uso-do-disco\">Parte 1 \u2014 Diagn\u00f3stico: Entendendo o Uso do Disco<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Antes de otimizar o disco no VPS Linux, voc\u00ea precisa saber exatamente o que est\u00e1 ocupando espa\u00e7o. Sem diagn\u00f3stico correto, voc\u00ea corre o risco de apagar arquivos importantes por engano.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-verificando-o-espaco-em-cada-particao\">Verificando o espa\u00e7o em cada parti\u00e7\u00e3o<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Use o comando abaixo para visualizar o uso de todas as parti\u00e7\u00f5es montadas de forma leg\u00edvel:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>df -h<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #D8DEE9\">df<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">-<\/span><span style=\"color: #D8DEE9\">h<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">O campo &#8220;Use%&#8221; mostra a porcentagem de uso. Se alguma parti\u00e7\u00e3o ultrapassar 80%, \u00e9 hora de agir.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-identificando-os-diretorios-mais-pesados\">Identificando os diret\u00f3rios mais pesados<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Para descobrir quais pastas consomem mais espa\u00e7o, use o du de forma recursiva:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>du -sh \/* 2>\/dev\/null | sort -rh | head -20<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #D8DEE9\">du<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">-<\/span><span style=\"color: #D8DEE9\">sh<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #616E88\">\/* 2&gt;\/dev\/null | sort -rh | head -20<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">Em seguida, aprofunde nos diret\u00f3rios suspeitos. Logs e cache s\u00e3o os maiores vil\u00f5es:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>du -sh \/var\/log\/*\ndu -sh \/var\/cache\/*<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #D8DEE9\">du<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">-<\/span><span style=\"color: #D8DEE9\">sh<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">\/var<\/span><span style=\"color: #D8DEE9FF\">\/<\/span><span style=\"color: #D8DEE9\">log<\/span><span style=\"color: #616E88\">\/*<\/span><\/span>\n<span class=\"line\"><span style=\"color: #616E88\">du -sh \/var\/cache\/*<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">Problemas de disco devem ser analisados junto com outras m\u00e9tricas do sistema. Veja tamb\u00e9m:<\/p>\n<\/blockquote>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong><a href=\"https:\/\/helpsysadmin.com.br\/blog\/iowait-alto-causas-reais\/\" target=\"_blank\" rel=\"noreferrer noopener\">como identificar iowait alto<\/a><\/strong><\/li>\n\n\n\n<li><strong><a href=\"https:\/\/helpsysadmin.com.br\/blog\/testar-velocidade-disco-linux\/\">como testar velocidade de disco<\/a><\/strong><\/li>\n\n\n\n<li><strong><a href=\"https:\/\/helpsysadmin.com.br\/blog\/latencia-de-disco-no-linux-alta\/\" target=\"_blank\" rel=\"noreferrer noopener\">como analisar lat\u00eancia de armazenamento<\/a><\/strong><\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Usando ncdu para navega\u00e7\u00e3o interativa<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A ferramenta ncdu oferece uma interface de terminal interativa para navegar pelo uso do disco. Instale com:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>apt install ncdu\u00a0\u00a0 # Debian\/Ubuntu\ndnf install ncdu\u00a0\u00a0 # CentOS\/Rocky\/Almalinux<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #D8DEE9\">apt<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">install<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">ncdu<\/span><span style=\"color: #D8DEE9FF\">\u00a0\u00a0 # <\/span><span style=\"color: #D8DEE9\">Debian<\/span><span style=\"color: #81A1C1\">\/<\/span><span style=\"color: #D8DEE9\">Ubuntu<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9\">dnf<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">install<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">ncdu<\/span><span style=\"color: #D8DEE9FF\">\u00a0\u00a0 # <\/span><span style=\"color: #D8DEE9\">CentOS<\/span><span style=\"color: #81A1C1\">\/<\/span><span style=\"color: #D8DEE9\">Rocky<\/span><span style=\"color: #81A1C1\">\/<\/span><span style=\"color: #D8DEE9\">Almalinux<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">Depois execute ncdu \/ para navegar pelos diret\u00f3rios e identificar visualmente onde est\u00e1 o problema.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td><strong>\ud83d\udca1 Dica profissional<\/strong> Combine df -h com watch para monitorar o disco em tempo real: watch -n 5 &#8216;df -h&#8217;. Isso \u00e9 \u00fatil durante limpezas para ver o progresso em tempo real.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Parte 2 \u2014 Limpeza de Pacotes e Cache<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Uma das formas mais r\u00e1pidas de <strong>otimizar o disco em VPS Linux<\/strong> \u00e9 remover pacotes desnecess\u00e1rios e limpar o cache do gerenciador de pacotes.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Ubuntu e Debian<\/h3>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>apt autoremove --purge\napt clean\napt autoclean<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #D8DEE9\">apt<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">autoremove<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">--<\/span><span style=\"color: #D8DEE9\">purge<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9\">apt<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">clean<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9\">apt<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">autoclean<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">O comando apt autoremove &#8211;purge remove pacotes \u00f3rf\u00e3os que foram instalados como depend\u00eancia e n\u00e3o s\u00e3o mais necess\u00e1rios. J\u00e1 o apt clean remove todos os arquivos .deb do cache local.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-centos-almalinux-rocky-linux-e-fedora\">CentOS, Almalinux, Rocky Linux e Fedora<\/h3>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>dnf autoremove\ndnf clean all<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #D8DEE9\">dnf<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">autoremove<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9\">dnf<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">clean<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">all<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">No DNF, o clean all remove metadados em cache, pacotes baixados e arquivos expirados. Pode liberar centenas de MB em servidores com hist\u00f3rico de muitas atualiza\u00e7\u00f5es.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Cache do pip (Python)<\/h3>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>pip3 cache purge<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #D8DEE9\">pip3<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">cache<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">purge<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">Ambientes Python acumulam pacotes em cache que podem ocupar bastante espa\u00e7o, especialmente em servidores de desenvolvimento.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Docker: o maior consumidor silencioso<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Containers, imagens e volumes Docker n\u00e3o utilizados podem consumir gigabytes rapidamente. Para uma limpeza agressiva:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>docker system prune -a --volumes<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #D8DEE9\">docker<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">system<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">prune<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">-<\/span><span style=\"color: #D8DEE9\">a<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">--<\/span><span style=\"color: #D8DEE9\">volumes<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">Para ver o quanto o Docker est\u00e1 consumindo antes de limpar:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>docker system df<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #D8DEE9\">docker<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">system<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">df<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td><strong>\ud83d\udca1 Aten\u00e7\u00e3o<\/strong> O comando docker system prune -a remove TODAS as imagens n\u00e3o utilizadas por containers ativos. Certifique-se de que n\u00e3o precisa dessas imagens antes de executar.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">O desempenho do armazenamento influencia diretamente CPU, mem\u00f3ria e tempo de resposta. Confira como melhorar a <strong><a href=\"https:\/\/helpsysadmin.com.br\/blog\/otimizar-vps-servidor-dedicado-cloud\/\" target=\"_blank\" rel=\"noreferrer noopener\">performance do servidor<\/a><\/strong>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Parte 3 \u2014 Gerenciamento de Logs com Logrotate<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Logs crescem silenciosamente e podem consumir dezenas de gigabytes. Para <strong>otimizar o disco do VPS Linux<\/strong> a longo prazo, \u00e9 essencial <a href=\"https:\/\/helpsysadmin.com.br\/blog\/configurar-login-automatico-phpmyadmin\/\" data-internallinksmanager029f6b8e52c=\"3\" title=\"Como Configurar Login Autom\u00e1tico no phpMyAdmin via DirectAdmin\">configurar<\/a> o logrotate corretamente.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Configura\u00e7\u00e3o b\u00e1sica do logrotate<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">O arquivo principal de configura\u00e7\u00e3o fica em \/etc\/logrotate.conf. Um exemplo de configura\u00e7\u00e3o eficiente:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\/var\/log\/meuapp\/*.log {<br>&nbsp;&nbsp;&nbsp; daily<br>&nbsp;&nbsp;&nbsp; rotate 7<br>&nbsp;&nbsp;&nbsp; compress<br>&nbsp;&nbsp;&nbsp; missingok<br>&nbsp;&nbsp;&nbsp; notifempty<br>&nbsp;&nbsp;&nbsp; delaycompress<br>}<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Explica\u00e7\u00e3o dos par\u00e2metros:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>daily \u2014 rotaciona os logs diariamente<\/li>\n\n\n\n<li>rotate 7 \u2014 mant\u00e9m apenas os \u00faltimos 7 arquivos<\/li>\n\n\n\n<li>compress \u2014 comprime logs antigos com gzip<\/li>\n\n\n\n<li>missingok \u2014 n\u00e3o gera erro se o arquivo de log n\u00e3o existir<\/li>\n\n\n\n<li>notifempty \u2014 n\u00e3o rotaciona se o arquivo estiver vazio<\/li>\n\n\n\n<li>delaycompress \u2014 comprime apenas na segunda rota\u00e7\u00e3o (\u00fatil para apps que mant\u00eam o arquivo aberto)<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Limpando logs do systemd (journald)<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">O journald do systemd pode crescer muito. Para limpar e definir um limite permanente:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>journalctl --vacuum-size=200M\njournalctl --vacuum-time=30d<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #D8DEE9\">journalctl<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">--<\/span><span style=\"color: #D8DEE9\">vacuum<\/span><span style=\"color: #81A1C1\">-<\/span><span style=\"color: #D8DEE9\">size<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #D8DEE9FF\">200<\/span><span style=\"color: #D8DEE9\">M<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9\">journalctl<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">--<\/span><span style=\"color: #D8DEE9\">vacuum<\/span><span style=\"color: #81A1C1\">-<\/span><span style=\"color: #D8DEE9\">time<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #D8DEE9FF\">30<\/span><span style=\"color: #D8DEE9\">d<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">Para tornar o limite permanente, edite \/etc\/systemd\/journald.conf e defina SystemMaxUse=200M.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">For\u00e7ando a rota\u00e7\u00e3o manualmente<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Para testar ou for\u00e7ar a rota\u00e7\u00e3o agora sem esperar o cron:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>logrotate -f \/etc\/logrotate.conf<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #D8DEE9\">logrotate<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">-<\/span><span style=\"color: #D8DEE9\">f<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">\/<\/span><span style=\"color: #D8DEE9\">etc<\/span><span style=\"color: #81A1C1\">\/<\/span><span style=\"color: #D8DEE9\">logrotate<\/span><span style=\"color: #ECEFF4\">.<\/span><span style=\"color: #D8DEE9\">conf<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Parte 4 \u2014 Arquivos Tempor\u00e1rios e \/tmp<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">O diret\u00f3rio \/tmp acumula arquivos tempor\u00e1rios que frequentemente ficam para tr\u00e1s. Para <strong>otimizar o disco no servidor VPS Linux<\/strong>, verifique se a limpeza autom\u00e1tica est\u00e1 ativa.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">systemd-tmpfiles<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">O systemd inclui o tmpfiles que apaga automaticamente arquivos em \/tmp ap\u00f3s 10 dias por padr\u00e3o. Para verificar e ajustar:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>cat \/usr\/lib\/tmpfiles.d\/tmp.conf<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #D8DEE9\">cat<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">\/<\/span><span style=\"color: #D8DEE9\">usr<\/span><span style=\"color: #81A1C1\">\/<\/span><span style=\"color: #D8DEE9\">lib<\/span><span style=\"color: #81A1C1\">\/<\/span><span style=\"color: #D8DEE9\">tmpfiles<\/span><span style=\"color: #ECEFF4\">.<\/span><span style=\"color: #D8DEE9\">d<\/span><span style=\"color: #81A1C1\">\/<\/span><span style=\"color: #D8DEE9\">tmp<\/span><span style=\"color: #ECEFF4\">.<\/span><span style=\"color: #D8DEE9\">conf<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">Para reduzir o prazo para 3 dias, edite ou crie \/etc\/tmpfiles.d\/tmp.conf:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>d \/tmp 1777 root root 3d\nd \/var\/tmp 1777 root root 7d<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #D8DEE9\">d<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">\/<\/span><span style=\"color: #D8DEE9\">tmp<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #B48EAD\">1777<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">root<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">root<\/span><span style=\"color: #D8DEE9FF\"> 3<\/span><span style=\"color: #D8DEE9\">d<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9\">d<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">\/var<\/span><span style=\"color: #D8DEE9FF\">\/<\/span><span style=\"color: #D8DEE9\">tmp<\/span><span style=\"color: #D8DEE9FF\"> 1777 root root 7d<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Limpeza manual de tempor\u00e1rios<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Para remover arquivos em \/tmp com mais de 7 dias de idade:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>find \/tmp -mtime +7 -delete 2>\/dev\/null<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #D8DEE9\">find<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">\/<\/span><span style=\"color: #D8DEE9\">tmp<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">-<\/span><span style=\"color: #D8DEE9\">mtime<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">+<\/span><span style=\"color: #B48EAD\">7<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">-delete<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #B48EAD\">2<\/span><span style=\"color: #81A1C1\">&gt;\/<\/span><span style=\"color: #D8DEE9\">dev<\/span><span style=\"color: #81A1C1\">\/null<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">14 dias:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>find \/var\/tmp -mtime +14 -delete 2>\/dev\/null<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #D8DEE9\">find<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">\/var<\/span><span style=\"color: #D8DEE9FF\">\/<\/span><span style=\"color: #D8DEE9\">tmp<\/span><span style=\"color: #D8DEE9FF\"> -mtime +14 -delete 2&gt;\/dev\/null<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Outros locais comuns de arquivos tempor\u00e1rios<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\/root \u2014 downloads e extra\u00e7\u00f5es esquecidas<\/li>\n\n\n\n<li>\/home\/usuario\/Downloads \u2014 arquivos de usu\u00e1rios<\/li>\n\n\n\n<li>\/var\/spool \u2014 filas de impress\u00e3o e e-mail abandonadas<\/li>\n\n\n\n<li>\/opt \u2014 softwares antigos n\u00e3o removidos<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Interpretar corretamente m\u00e9tricas de disco \u00e9 essencial para evitar gargalos. Veja o guia de <strong><a href=\"https:\/\/helpsysadmin.com.br\/blog\/otimizar-vps-servidor-dedicado-cloud\/\" target=\"_blank\" rel=\"noreferrer noopener\">otimiza\u00e7\u00e3o de servidores<\/a><\/strong>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Parte 5 \u2014 Remo\u00e7\u00e3o de Kernels Antigos<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Cada atualiza\u00e7\u00e3o do kernel Linux mant\u00e9m a vers\u00e3o anterior como fallback. Com o tempo, v\u00e1rios kernels se acumulam. Para <strong>otimizar o disco do VPS Linux<\/strong>, remova os kernels n\u00e3o utilizados.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">No Ubuntu\/Debian<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Liste os kernels instalados:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>dpkg --list | grep linux-image<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #D8DEE9\">dpkg<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">--<\/span><span style=\"color: #D8DEE9\">list<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">|<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">grep<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">linux<\/span><span style=\"color: #81A1C1\">-<\/span><span style=\"color: #D8DEE9\">image<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">Identifique o kernel atual em uso:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>uname -r<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #D8DEE9\">uname<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">-<\/span><span style=\"color: #D8DEE9\">r<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">Remova kernels antigos (substitua X.X.X pela vers\u00e3o a remover):<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>apt purge linux-image-X.X.X-generic\napt autoremove --purge\nupdate-grub<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #D8DEE9\">apt<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">purge<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">linux<\/span><span style=\"color: #81A1C1\">-<\/span><span style=\"color: #D8DEE9\">image<\/span><span style=\"color: #81A1C1\">-<\/span><span style=\"color: #D8DEE9\">X<\/span><span style=\"color: #ECEFF4\">.<\/span><span style=\"color: #D8DEE9\">X<\/span><span style=\"color: #ECEFF4\">.<\/span><span style=\"color: #D8DEE9\">X<\/span><span style=\"color: #81A1C1\">-<\/span><span style=\"color: #D8DEE9\">generic<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9\">apt<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">autoremove<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">--<\/span><span style=\"color: #D8DEE9\">purge<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9\">update<\/span><span style=\"color: #81A1C1\">-<\/span><span style=\"color: #D8DEE9\">grub<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-no-centos-rocky-linux-almalinux\">No CentOS\/Rocky Linux\/Almalinux<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Limite automaticamente o n\u00famero de kernels mantidos:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>dnf remove --oldinstallonly --setopt installonly_limit=2<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #D8DEE9\">dnf<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">remove<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">--<\/span><span style=\"color: #D8DEE9\">oldinstallonly<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">--<\/span><span style=\"color: #D8DEE9\">setopt<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">installonly_limit<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #B48EAD\">2<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td><strong>\ud83d\udca1 Regra de seguran\u00e7a<\/strong> Mantenha sempre ao menos duas vers\u00f5es do kernel: a atual e a imediatamente anterior. Isso garante um fallback caso a vers\u00e3o atual tenha problemas ap\u00f3s uma atualiza\u00e7\u00e3o.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Lat\u00eancia alta e I\/O excessivo podem causar lentid\u00e3o severa. Veja a estrat\u00e9gia de <strong><a href=\"https:\/\/helpsysadmin.com.br\/blog\/otimizar-vps-servidor-dedicado-cloud\/\" target=\"_blank\" rel=\"noreferrer noopener\">otimiza\u00e7\u00e3o de infraestrutura Linux<\/a><\/strong><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Parte 6 \u2014 Compress\u00e3o de Arquivos e Deduplica\u00e7\u00e3o<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">T\u00e9cnicas avan\u00e7adas de compress\u00e3o ajudam a <strong>otimizar o disco VPS Linux<\/strong> reduzindo o espa\u00e7o de backups e arquivos antigos.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Comprimindo backups com zstd<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">O zstd oferece excelente raz\u00e3o velocidade\/compress\u00e3o:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>tar -I zstd -cf backup.tar.zst \/var\/www\/\nzstd --rm arquivo_grande.sql<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #D8DEE9\">tar<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">-<\/span><span style=\"color: #D8DEE9\">I<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">zstd<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">-<\/span><span style=\"color: #D8DEE9\">cf<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">backup<\/span><span style=\"color: #ECEFF4\">.<\/span><span style=\"color: #D8DEE9\">tar<\/span><span style=\"color: #ECEFF4\">.<\/span><span style=\"color: #D8DEE9\">zst<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">\/var<\/span><span style=\"color: #D8DEE9FF\">\/<\/span><span style=\"color: #D8DEE9\">www<\/span><span style=\"color: #D8DEE9FF\">\/<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9\">zstd<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">--<\/span><span style=\"color: #D8DEE9\">rm<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">arquivo_grande<\/span><span style=\"color: #ECEFF4\">.<\/span><span style=\"color: #D8DEE9\">sql<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Identificando arquivos duplicados com fdupes<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Instale e execute o fdupes para encontrar arquivos duplicados:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>apt install fdupes\u00a0\u00a0 # Debian\/Ubuntu\ndnf install fdupes\u00a0\u00a0 # CentOS\/Rocky\/Almalinux<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #D8DEE9\">apt<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">install<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">fdupes<\/span><span style=\"color: #D8DEE9FF\">\u00a0\u00a0 # <\/span><span style=\"color: #D8DEE9\">Debian<\/span><span style=\"color: #81A1C1\">\/<\/span><span style=\"color: #D8DEE9\">Ubuntu<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9\">dnf<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">install<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">fdupes<\/span><span style=\"color: #D8DEE9FF\">\u00a0\u00a0 # <\/span><span style=\"color: #D8DEE9\">CentOS<\/span><span style=\"color: #81A1C1\">\/<\/span><span style=\"color: #D8DEE9\">Rocky<\/span><span style=\"color: #81A1C1\">\/<\/span><span style=\"color: #D8DEE9\">Almalinux<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>fdupes -r \/var\/backups\nfdupes -r -d \/var\/backups\u00a0\u00a0 # Remove duplicatas interativamente<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #D8DEE9\">fdupes<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">-<\/span><span style=\"color: #D8DEE9\">r<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">\/var<\/span><span style=\"color: #D8DEE9FF\">\/<\/span><span style=\"color: #D8DEE9\">backups<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9\">fdupes<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">-<\/span><span style=\"color: #D8DEE9\">r<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">-<\/span><span style=\"color: #D8DEE9\">d<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">\/var<\/span><span style=\"color: #D8DEE9FF\">\/<\/span><span style=\"color: #D8DEE9\">backups<\/span><span style=\"color: #D8DEE9FF\">\u00a0\u00a0 # Remove duplicatas interativamente<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Pol\u00edtica de reten\u00e7\u00e3o de backups<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Defina uma pol\u00edtica clara para evitar ac\u00famulo de backups antigos:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Backups di\u00e1rios: manter por 7 dias<\/li>\n\n\n\n<li>Backups semanais: manter por 4 semanas<\/li>\n\n\n\n<li>Backups mensais: manter por 3 meses<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Use find para implementar automaticamente:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>find \/var\/backups\/diario -mtime +7 -delete\nfind \/var\/backups\/semanal -mtime +28 -delete<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #D8DEE9\">find<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">\/var<\/span><span style=\"color: #D8DEE9FF\">\/<\/span><span style=\"color: #D8DEE9\">backups<\/span><span style=\"color: #D8DEE9FF\">\/diario -mtime +7 -delete<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9\">find<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">\/var<\/span><span style=\"color: #D8DEE9FF\">\/<\/span><span style=\"color: #D8DEE9\">backups<\/span><span style=\"color: #D8DEE9FF\">\/semanal -mtime +28 -delete<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">Ajustes corretos podem reduzir escrita em disco e melhorar estabilidade. Veja como <strong><a href=\"https:\/\/helpsysadmin.com.br\/blog\/otimizar-vps-servidor-dedicado-cloud\/\" target=\"_blank\" rel=\"noreferrer noopener\">otimizar VPS Linux<\/a><\/strong>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Parte 7 \u2014 Monitoramento Cont\u00ednuo e Alertas<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">A melhor estrat\u00e9gia para <strong>otimizar o disco em VPS Linux<\/strong> de forma sustent\u00e1vel \u00e9 o monitoramento proativo. Agir antes que o disco chegue a 100% evita quedas de servi\u00e7o.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Script de alerta via cron<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Crie um script \/usr\/local\/bin\/check_disk.sh com o seguinte conte\u00fado:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>#!\/bin\/bash\n\nLIMITE=80\n\nEMAIL=\"admin@seusite.com\"\n\ndf -H | awk -v limit=$LIMITE 'NR>1 &amp;&amp; int($5)>=limit {print}' | \\\n\nwhile read linha; do\n\n\u00a0 echo \"ALERTA: $linha\" | mail -s \"Disco cr\u00edtico: $(hostname)\" $EMAIL\n\ndone<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #616E88\">#!\/bin\/bash<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9\">LIMITE<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #B48EAD\">80<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9\">EMAIL<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">admin@seusite.com<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9\">df<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">-<\/span><span style=\"color: #D8DEE9\">H<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">|<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">awk<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">-<\/span><span style=\"color: #D8DEE9\">v<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">limit<\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #D8DEE9\">$LIMITE<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #A3BE8C\">NR&gt;1 &amp;&amp; int($5)&gt;=limit {print}<\/span><span style=\"color: #ECEFF4\">&#39;<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">|<\/span><span style=\"color: #D8DEE9FF\"> \\<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #81A1C1\">while<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">read<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">linha<\/span><span style=\"color: #81A1C1\">;<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">do<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">\u00a0 <\/span><span style=\"color: #D8DEE9\">echo<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">ALERTA: $linha<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">|<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">mail<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">-<\/span><span style=\"color: #D8DEE9\">s<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #A3BE8C\">Disco cr\u00edtico: $(hostname)<\/span><span style=\"color: #ECEFF4\">&quot;<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #D8DEE9\">$EMAIL<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9\">done<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Adicione ao crontab para executar a cada hora:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">crontab -e<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">0 * * * * \/usr\/local\/bin\/check_disk.sh<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Ferramentas de monitoramento visual<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Para equipes que precisam de dashboards completos, considere:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong><a href=\"https:\/\/www.netdata.cloud\/\">Netdata<\/a><\/strong> \u2014 monitoramento em tempo real, gratuito, f\u00e1cil de instalar<\/li>\n\n\n\n<li><strong><a href=\"https:\/\/grafana.com\/\">Grafana<\/a><\/strong> + <strong><a href=\"https:\/\/prometheus.io\/\">Prometheus<\/a><\/strong> \u2014 dashboards customiz\u00e1veis e alertas avan\u00e7ados<\/li>\n\n\n\n<li><strong><a href=\"https:\/\/www.zabbix.com\/\">Zabbix<\/a><\/strong> \u2014 solu\u00e7\u00e3o enterprise para m\u00faltiplos servidores<\/li>\n\n\n\n<li><strong><a href=\"https:\/\/uptime.kuma.pet\/\" target=\"_blank\" rel=\"noreferrer noopener\">Uptime Kuma<\/a><\/strong> \u2014 monitoramento leve com alertas por Telegram e e-mail<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Conclus\u00e3o<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Otimizar o disco em VPS Linux<\/strong> n\u00e3o \u00e9 uma tarefa pontual \u2014 \u00e9 um processo cont\u00ednuo. Com diagn\u00f3stico regular, limpeza automatizada de pacotes e logs, remo\u00e7\u00e3o de kernels antigos e monitoramento ativo, voc\u00ea garante que seu servidor opere com efici\u00eancia m\u00e1xima.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Implemente as t\u00e9cnicas deste guia gradualmente: comece pelo diagn\u00f3stico, depois aplique as limpezas b\u00e1sicas de pacotes e logs, e por fim configure o monitoramento autom\u00e1tico. Se ap\u00f3s todas essas otimiza\u00e7\u00f5es o espa\u00e7o ainda for insuficiente, considere expandir o volume do disco no painel do seu provedor \u2014 mas com as boas pr\u00e1ticas acima, voc\u00ea vai postergar essa necessidade por muito tempo.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Para manter estabilidade e desempenho, \u00e9 importante otimizar completamente o ambiente. Consulte o guia de <strong><a href=\"https:\/\/helpsysadmin.com.br\/blog\/otimizar-vps-servidor-dedicado-cloud\/\" target=\"_blank\" rel=\"noreferrer noopener\">otimizar VPS, servidor dedicado e cloud<\/a><\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Resumo das a\u00e7\u00f5es principais para <strong>otimizar o disco do VPS Linux<\/strong>:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>df -h e du -sh para diagn\u00f3stico<\/li>\n\n\n\n<li>apt autoremove \/ dnf clean para limpeza de pacotes<\/li>\n\n\n\n<li>Configurar logrotate e journalctl &#8211;vacuum<\/li>\n\n\n\n<li>Remover kernels antigos de \/boot<\/li>\n\n\n\n<li>Docker system prune para containers e imagens<\/li>\n\n\n\n<li>fdupes para eliminar arquivos duplicados<\/li>\n\n\n\n<li>Script cron para alertas de uso acima de 80%<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-faq-perguntas-frequentes\">FAQ \u2014 Perguntas Frequentes<\/h3>\n\n\n\n<div class=\"schema-faq wp-block-yoast-faq-block\"><div class=\"schema-faq-section\" id=\"faq-question-1778966613131\"><strong class=\"schema-faq-question\"><strong>Como verificar o uso do disco em um VPS Linux?<\/strong><\/strong> <p class=\"schema-faq-answer\">Use o comando df -h para visualizar o espa\u00e7o dispon\u00edvel em cada parti\u00e7\u00e3o montada. Para identificar quais pastas consomem mais espa\u00e7o, execute du -sh \/* ou instale o ncdu para uma interface de terminal interativa.<\/p> <\/div> <div class=\"schema-faq-section\" id=\"faq-question-1778966652126\"><strong class=\"schema-faq-question\"><strong>Qual o comando para limpar o cache de pacotes no Ubuntu\/VPS Linux?<\/strong><\/strong> <p class=\"schema-faq-answer\">Execute apt autoremove &#8211;purge &amp;&amp; apt clean no terminal. Isso remove pacotes \u00f3rf\u00e3os e limpa o cache do APT, podendo liberar centenas de MB ou at\u00e9 alguns GB de espa\u00e7o.<\/p> <\/div> <div class=\"schema-faq-section\" id=\"faq-question-1778966678094\"><strong class=\"schema-faq-question\"><strong>Como configurar logrotate para otimizar o disco no servidor Linux?<\/strong><\/strong> <p class=\"schema-faq-answer\">Crie ou edite um arquivo em \/etc\/logrotate.d\/ com as diretivas: daily, rotate 7, compress, missingok e notifempty. Isso garante que logs antigos sejam comprimidos e removidos automaticamente.<\/p> <\/div> <div class=\"schema-faq-section\" id=\"faq-question-1778966703535\"><strong class=\"schema-faq-question\"><strong>Como remover kernels antigos para liberar espa\u00e7o em \/boot no Linux?<\/strong><\/strong> <p class=\"schema-faq-answer\">No Debian\/Ubuntu, liste os kernels com dpkg &#8211;list | grep linux-image, identifique o kernel atual com uname -r, e remova os desnecess\u00e1rios com apt purge linux-image-X.X.X-generic. Mantenha sempre ao menos o kernel atual e o anterior.<\/p> <\/div> <div class=\"schema-faq-section\" id=\"faq-question-1778966731717\"><strong class=\"schema-faq-question\"><strong>Docker est\u00e1 consumindo muito disco no VPS \u2014 como resolver?<\/strong><\/strong> <p class=\"schema-faq-answer\">Execute docker system prune -a &#8211;volumes para remover imagens, containers parados e volumes n\u00e3o utilizados. Antes, verifique o consumo atual com docker system df. Esse comando pode liberar v\u00e1rios gigabytes em servidores com uso intenso de containers.<\/p> <\/div> <div class=\"schema-faq-section\" id=\"faq-question-1778966788595\"><strong class=\"schema-faq-question\"><strong>Com que frequ\u00eancia devo otimizar o disco do meu VPS Linux?<\/strong><\/strong> <p class=\"schema-faq-answer\">Recomenda-se uma limpeza manual mensal e monitoramento automatizado cont\u00ednuo via cron. Configure alertas quando o uso ultrapassar 75\u201380% para ter tempo h\u00e1bil de agir antes de uma queda de servi\u00e7o.<\/p> <\/div> <\/div>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-veja-tambem\">Veja Tamb\u00e9m:<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong><a href=\"https:\/\/helpsysadmin.com.br\/blog\/otimizar-vps-servidor-dedicado-cloud\/\" target=\"_blank\" rel=\"noreferrer noopener\">Como Otimizar VPS, Servidor Dedicado ou Cloud: Guia Completo<\/a><\/strong><br><strong><a href=\"https:\/\/helpsysadmin.com.br\/blog\/identificar-gargalo-vps-servidor-dedicado-cloud\/\">Servidor Lento: Identifique Gargalo em VPS, Dedicado ou Cloud<\/a><\/strong><br><strong><a href=\"https:\/\/helpsysadmin.com.br\/blog\/cpu-100-vm-vs-bare-metal\/\" target=\"_blank\" rel=\"noreferrer noopener\">CPU 100%: Diferen\u00e7as Entre VM e Bare Metal no Servidor<\/a><\/strong><br><strong><a href=\"https:\/\/helpsysadmin.com.br\/blog\/iowait-alto-nvme-cloud\/\">iowait Alto NVMe Cloud: Como Diagnosticar Gargalo de Disco<\/a><\/strong><br><strong><a href=\"https:\/\/helpsysadmin.com.br\/blog\/load-average-em-ambiente-virtualizado-como-interpretar-vps-e-cloud\/\">Load Average em Ambiente Virtualizado: Como Interpretar VPS e Cloud<\/a><\/strong><br><strong><a href=\"https:\/\/helpsysadmin.com.br\/blog\/steal-time-alto-vps\/\" target=\"_blank\" rel=\"noreferrer noopener\">Steal Time Alto na VPS: O Que \u00c9 e Como Resolver o Gargalo<\/a><\/strong><br><strong><a href=\"https:\/\/helpsysadmin.com.br\/blog\/como-medir-performance-servidores-linux\/\" target=\"_blank\" rel=\"noreferrer noopener\"><\/a><a href=\"https:\/\/helpsysadmin.com.br\/blog\/como-medir-performance-servidores-linux\/\" target=\"_blank\" rel=\"noreferrer noopener\">Como Medir Performance de Servidor Linux na Pr\u00e1tica (Al\u00e9m da CPU)<\/a><\/strong><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-veja-mais\">Veja Mais:<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong><a href=\"https:\/\/helpsysadmin.com.br\/blog\/vps-lenta-diagnostico-otimizacao\/\">VPS Lenta? Guia de Diagn\u00f3stico, Otimiza\u00e7\u00e3o e Escalonamento<\/a><\/strong><br><strong><a href=\"https:\/\/helpsysadmin.com.br\/blog\/cloud-vs-servidor-dedicado-sites-medios\/\">Cloud vale a pena para sites m\u00e9dios? O Guia Definitivo<\/a><\/strong><br><strong><a href=\"https:\/\/helpsysadmin.com.br\/blog\/overprovisioning-em-cloud-guia-otimizacao\/\">Overprovisioning em Cloud: O Guia Definitivo para SysAdmins (2026)<\/a><\/strong><br><strong><a href=\"https:\/\/helpsysadmin.com.br\/blog\/quando-migrar-servidor-dedicado-performance\/\">Quando migrar para servidor dedicado?<\/a><\/strong><br><strong><a href=\"https:\/\/helpsysadmin.com.br\/blog\/benchmark-vps-vs-servidor-dedicado-performance\/\">VPS vs Servidor Dedicado em 2026 (Guia T\u00e9cnico)<\/a><\/strong><br><strong><a href=\"https:\/\/helpsysadmin.com.br\/blog\/guia-completo-comando-sar-linux\/\">Definitivo: Como Dominar o Comando Sar Linux para Monitoramento<\/a><\/strong><br><strong><a href=\"https:\/\/helpsysadmin.com.br\/blog\/diagnostico-vps-lento-checklist\/\">Diagn\u00f3stico de VPS Lento: Checklist Completo e Definitivo<\/a><\/strong><br><strong><a href=\"https:\/\/helpsysadmin.com.br\/blog\/servidor-dedicado-lento-solucoes\/\">Servidor Dedicado Lento? 15 Causas e Solu\u00e7\u00f5es Definitivas (2026)<\/a><\/strong><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-saiba-mais\">Saiba Mais:<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong><a href=\"https:\/\/helpsysadmin.com.br\/blog\/otimizar-uso-cpu-vps-linux\/\">Como Otimizar o Uso de CPU em uma VPS Linux: Guia Definitivo<\/a><\/strong><br><strong><a href=\"https:\/\/helpsysadmin.com.br\/blog\/servidor-dedicado-lento-causas-comuns\/\">Servidor dedicado lento? 10 causas comuns e como resolver<\/a><\/strong><br><strong><a href=\"https:\/\/helpsysadmin.com.br\/blog\/como-identificar-gargalo-do-servidor\/\" target=\"_blank\" rel=\"noreferrer noopener\">Como Identificar o Gargalo do Servidor: Guia Completo (Diagn\u00f3stico 5 Min)<\/a><\/strong><br><strong><a href=\"https:\/\/helpsysadmin.com.br\/blog\/interpretar-metricas-performance\/\" target=\"_blank\" rel=\"noreferrer noopener\">Como Interpretar M\u00e9tricas de Performance Corretamente no Linux<\/a><\/strong><br><strong><a href=\"https:\/\/helpsysadmin.com.br\/blog\/servidores-lentos-erros-configuracao\/\">Servidores Lentos: 5 Erros de Configura\u00e7\u00e3o e Como Corrigir<\/a><\/strong><br><strong><a href=\"https:\/\/helpsysadmin.com.br\/blog\/como-evitar-cpu-steal-em-vps\/\">Como Evitar CPU Steal em VPS: Guia Pr\u00e1tico de Performance<\/a><\/strong><br><strong><a href=\"https:\/\/helpsysadmin.com.br\/blog\/como-diagnosticar-vps-lento\/\">Como Diagnosticar VPS Lento: Guia Passo a Passo via SSH<\/a><\/strong><br><strong><a href=\"https:\/\/helpsysadmin.com.br\/blog\/otimizar-memoria-ram-linux-server\/\">Otimizar memoria ram no linux server e Evitar o OOM Killer<\/a><\/strong><br><strong><a href=\"https:\/\/helpsysadmin.com.br\/blog\/como-calcular-ram-servidor-linux\/\">Como Calcular a RAM Ideal para Seu Servidor Linux<\/a><\/strong><br><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Manter o espa\u00e7o em disco bem gerenciado \u00e9 uma das tarefas mais cr\u00edticas para quem administra um servidor. Quando o disco enche, [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":6959,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4189],"tags":[],"class_list":["post-6958","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-performance-e-otimizacao"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.9 (Yoast SEO v27.9) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Como Otimizar Disco em VPS Linux: Guia Completo 2026<\/title>\n<meta name=\"description\" content=\"Aprenda a otimizar o disco em VPS Linux com comandos pr\u00e1ticos: df, du, logrotate e limpeza de pacotes. Libere espa\u00e7o e melhore a performance.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/helpsysadmin.com.br\/blog\/otimizar-disco-vps-linux\/\" \/>\n<meta property=\"og:locale\" content=\"pt_BR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Como Otimizar Disco em VPS Linux: Guia Completo 2026\" \/>\n<meta property=\"og:description\" content=\"Aprenda a otimizar o disco em VPS Linux com comandos pr\u00e1ticos: df, du, logrotate e limpeza de pacotes. Libere espa\u00e7o e melhore a performance.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/helpsysadmin.com.br\/blog\/otimizar-disco-vps-linux\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog HelpSysAdmin\" \/>\n<meta property=\"article:published_time\" content=\"2026-05-16T21:34:29+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-05-16T22:57:29+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/mlkpd8g42nae.i.optimole.com\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/helpsysadmin.com.br\/blog\/wp-content\/uploads\/2026\/05\/otimizar_disco_vps_linux.webp\" \/>\n\t<meta property=\"og:image:width\" content=\"1536\" \/>\n\t<meta property=\"og:image:height\" content=\"1024\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/webp\" \/>\n<meta name=\"author\" content=\"HelpSysAdmin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@brhelpsysad\" \/>\n<meta name=\"twitter:site\" content=\"@brhelpsysad\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/helpsysadmin.com.br\\\/blog\\\/otimizar-disco-vps-linux\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/helpsysadmin.com.br\\\/blog\\\/otimizar-disco-vps-linux\\\/\"},\"author\":{\"name\":\"HelpSysAdmin\",\"@id\":\"https:\\\/\\\/helpsysadmin.com.br\\\/blog\\\/#\\\/schema\\\/person\\\/bdbe3d7d71a0c6a3cb474c18da574efb\"},\"headline\":\"Como Otimizar Disco em VPS Linux: Guia Completo 2026\",\"datePublished\":\"2026-05-16T21:34:29+00:00\",\"dateModified\":\"2026-05-16T22:57:29+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/helpsysadmin.com.br\\\/blog\\\/otimizar-disco-vps-linux\\\/\"},\"wordCount\":1941,\"publisher\":{\"@id\":\"https:\\\/\\\/helpsysadmin.com.br\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/helpsysadmin.com.br\\\/blog\\\/otimizar-disco-vps-linux\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\/\\/helpsysadmin.com.br\\/blog\\/wp-content\\/uploads\\/2026\\/05\\/otimizar_disco_vps_linux.webp\",\"articleSection\":[\"Performance e Otimiza\u00e7\u00e3o (Tuning)\"],\"inLanguage\":\"pt-BR\"},{\"@type\":[\"WebPage\",\"FAQPage\"],\"@id\":\"https:\\\/\\\/helpsysadmin.com.br\\\/blog\\\/otimizar-disco-vps-linux\\\/\",\"url\":\"https:\\\/\\\/helpsysadmin.com.br\\\/blog\\\/otimizar-disco-vps-linux\\\/\",\"name\":\"Como Otimizar Disco em VPS Linux: Guia Completo 2026\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/helpsysadmin.com.br\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/helpsysadmin.com.br\\\/blog\\\/otimizar-disco-vps-linux\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/helpsysadmin.com.br\\\/blog\\\/otimizar-disco-vps-linux\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\/\\/helpsysadmin.com.br\\/blog\\/wp-content\\/uploads\\/2026\\/05\\/otimizar_disco_vps_linux.webp\",\"datePublished\":\"2026-05-16T21:34:29+00:00\",\"dateModified\":\"2026-05-16T22:57:29+00:00\",\"description\":\"Aprenda a otimizar o disco em VPS Linux com comandos pr\u00e1ticos: df, du, logrotate e limpeza de pacotes. Libere espa\u00e7o e melhore a performance.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/helpsysadmin.com.br\\\/blog\\\/otimizar-disco-vps-linux\\\/#breadcrumb\"},\"mainEntity\":[{\"@id\":\"https:\\\/\\\/helpsysadmin.com.br\\\/blog\\\/otimizar-disco-vps-linux\\\/#faq-question-1778966613131\"},{\"@id\":\"https:\\\/\\\/helpsysadmin.com.br\\\/blog\\\/otimizar-disco-vps-linux\\\/#faq-question-1778966652126\"},{\"@id\":\"https:\\\/\\\/helpsysadmin.com.br\\\/blog\\\/otimizar-disco-vps-linux\\\/#faq-question-1778966678094\"},{\"@id\":\"https:\\\/\\\/helpsysadmin.com.br\\\/blog\\\/otimizar-disco-vps-linux\\\/#faq-question-1778966703535\"},{\"@id\":\"https:\\\/\\\/helpsysadmin.com.br\\\/blog\\\/otimizar-disco-vps-linux\\\/#faq-question-1778966731717\"},{\"@id\":\"https:\\\/\\\/helpsysadmin.com.br\\\/blog\\\/otimizar-disco-vps-linux\\\/#faq-question-1778966788595\"}],\"inLanguage\":\"pt-BR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/helpsysadmin.com.br\\\/blog\\\/otimizar-disco-vps-linux\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"pt-BR\",\"@id\":\"https:\\\/\\\/helpsysadmin.com.br\\\/blog\\\/otimizar-disco-vps-linux\\\/#primaryimage\",\"url\":\"https:\\/\\/helpsysadmin.com.br\\/blog\\/wp-content\\/uploads\\/2026\\/05\\/otimizar_disco_vps_linux.webp\",\"contentUrl\":\"https:\\/\\/helpsysadmin.com.br\\/blog\\/wp-content\\/uploads\\/2026\\/05\\/otimizar_disco_vps_linux.webp\",\"width\":1536,\"height\":1024,\"caption\":\"otimizar disco vps linux\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/helpsysadmin.com.br\\\/blog\\\/otimizar-disco-vps-linux\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/helpsysadmin.com.br\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Como Otimizar Disco em VPS Linux: Guia Completo 2026\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/helpsysadmin.com.br\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/helpsysadmin.com.br\\\/blog\\\/\",\"name\":\"Blog HelpSysAdmin\",\"description\":\"Webserver linux blog\",\"publisher\":{\"@id\":\"https:\\\/\\\/helpsysadmin.com.br\\\/blog\\\/#organization\"},\"alternateName\":\"HelpSysAdmin Blog\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/helpsysadmin.com.br\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"pt-BR\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/helpsysadmin.com.br\\\/blog\\\/#organization\",\"name\":\"HelpSysAdmin Gerenciamento de Servidores\",\"alternateName\":\"HelpSysAdmin\",\"url\":\"https:\\\/\\\/helpsysadmin.com.br\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"pt-BR\",\"@id\":\"https:\\\/\\\/helpsysadmin.com.br\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\/\\/mlkpd8g42nae.i.optimole.com\\/w:512\\/h:512\\/q:mauto\\/f:best\\/https:\\/\\/helpsysadmin.com.br\\/blog\\/wp-content\\/uploads\\/2020\\/12\\/favicon.png\",\"contentUrl\":\"https:\\/\\/mlkpd8g42nae.i.optimole.com\\/w:512\\/h:512\\/q:mauto\\/f:best\\/https:\\/\\/helpsysadmin.com.br\\/blog\\/wp-content\\/uploads\\/2020\\/12\\/favicon.png\",\"width\":512,\"height\":512,\"caption\":\"HelpSysAdmin Gerenciamento de Servidores\"},\"image\":{\"@id\":\"https:\\\/\\\/helpsysadmin.com.br\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/x.com\\\/brhelpsysad\",\"https:\\\/\\\/mastodon.social\\\/@helpsysadmin\"],\"description\":\"Oferecemos o gerenciamento de servidores dedicados, vps ou cloud. Apresentamos a melhor experi\u00eancia em atendimento e servi\u00e7o. Nosso time cuidar\u00e1 do seu servidor com backups, an\u00e1lises constantes, ajustes de seguran\u00e7a, realiza\u00e7\u00e3o de manuten\u00e7\u00e3o preventiva e corretiva, otimiza\u00e7\u00e3o de performance al\u00e9m de monitoramento 24\u00d77 com suporte Pr\u00f3 Ativo.\",\"numberOfEmployees\":{\"@type\":\"QuantitativeValue\",\"minValue\":\"1\",\"maxValue\":\"10\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/helpsysadmin.com.br\\\/blog\\\/#\\\/schema\\\/person\\\/bdbe3d7d71a0c6a3cb474c18da574efb\",\"name\":\"HelpSysAdmin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"pt-BR\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/efc0007e6a313a844b72de257e05c6083b07b6ecc6983a4f71e06293ff2e22fd?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/efc0007e6a313a844b72de257e05c6083b07b6ecc6983a4f71e06293ff2e22fd?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/efc0007e6a313a844b72de257e05c6083b07b6ecc6983a4f71e06293ff2e22fd?s=96&d=mm&r=g\",\"caption\":\"HelpSysAdmin\"},\"sameAs\":[\"https:\\\/\\\/helpsysadmin.com.br\\\/blog\\\/\"]},{\"@type\":\"Question\",\"@id\":\"https:\\\/\\\/helpsysadmin.com.br\\\/blog\\\/otimizar-disco-vps-linux\\\/#faq-question-1778966613131\",\"position\":1,\"url\":\"https:\\\/\\\/helpsysadmin.com.br\\\/blog\\\/otimizar-disco-vps-linux\\\/#faq-question-1778966613131\",\"name\":\"Como verificar o uso do disco em um VPS Linux?\",\"answerCount\":1,\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\"Use o comando df -h para visualizar o espa\u00e7o dispon\u00edvel em cada parti\u00e7\u00e3o montada. Para identificar quais pastas consomem mais espa\u00e7o, execute du -sh \\\/* ou instale o ncdu para uma interface de terminal interativa.\",\"inLanguage\":\"pt-BR\"},\"inLanguage\":\"pt-BR\"},{\"@type\":\"Question\",\"@id\":\"https:\\\/\\\/helpsysadmin.com.br\\\/blog\\\/otimizar-disco-vps-linux\\\/#faq-question-1778966652126\",\"position\":2,\"url\":\"https:\\\/\\\/helpsysadmin.com.br\\\/blog\\\/otimizar-disco-vps-linux\\\/#faq-question-1778966652126\",\"name\":\"Qual o comando para limpar o cache de pacotes no Ubuntu\\\/VPS Linux?\",\"answerCount\":1,\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\"Execute apt autoremove --purge &amp;&amp; apt clean no terminal. Isso remove pacotes \u00f3rf\u00e3os e limpa o cache do APT, podendo liberar centenas de MB ou at\u00e9 alguns GB de espa\u00e7o.\",\"inLanguage\":\"pt-BR\"},\"inLanguage\":\"pt-BR\"},{\"@type\":\"Question\",\"@id\":\"https:\\\/\\\/helpsysadmin.com.br\\\/blog\\\/otimizar-disco-vps-linux\\\/#faq-question-1778966678094\",\"position\":3,\"url\":\"https:\\\/\\\/helpsysadmin.com.br\\\/blog\\\/otimizar-disco-vps-linux\\\/#faq-question-1778966678094\",\"name\":\"Como configurar logrotate para otimizar o disco no servidor Linux?\",\"answerCount\":1,\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\"Crie ou edite um arquivo em \\\/etc\\\/logrotate.d\\\/ com as diretivas: daily, rotate 7, compress, missingok e notifempty. Isso garante que logs antigos sejam comprimidos e removidos automaticamente.\",\"inLanguage\":\"pt-BR\"},\"inLanguage\":\"pt-BR\"},{\"@type\":\"Question\",\"@id\":\"https:\\\/\\\/helpsysadmin.com.br\\\/blog\\\/otimizar-disco-vps-linux\\\/#faq-question-1778966703535\",\"position\":4,\"url\":\"https:\\\/\\\/helpsysadmin.com.br\\\/blog\\\/otimizar-disco-vps-linux\\\/#faq-question-1778966703535\",\"name\":\"Como remover kernels antigos para liberar espa\u00e7o em \\\/boot no Linux?\",\"answerCount\":1,\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\"No Debian\\\/Ubuntu, liste os kernels com dpkg --list | grep linux-image, identifique o kernel atual com uname -r, e remova os desnecess\u00e1rios com apt purge linux-image-X.X.X-generic. Mantenha sempre ao menos o kernel atual e o anterior.\",\"inLanguage\":\"pt-BR\"},\"inLanguage\":\"pt-BR\"},{\"@type\":\"Question\",\"@id\":\"https:\\\/\\\/helpsysadmin.com.br\\\/blog\\\/otimizar-disco-vps-linux\\\/#faq-question-1778966731717\",\"position\":5,\"url\":\"https:\\\/\\\/helpsysadmin.com.br\\\/blog\\\/otimizar-disco-vps-linux\\\/#faq-question-1778966731717\",\"name\":\"Docker est\u00e1 consumindo muito disco no VPS \u2014 como resolver?\",\"answerCount\":1,\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\"Execute docker system prune -a --volumes para remover imagens, containers parados e volumes n\u00e3o utilizados. Antes, verifique o consumo atual com docker system df. Esse comando pode liberar v\u00e1rios gigabytes em servidores com uso intenso de containers.\",\"inLanguage\":\"pt-BR\"},\"inLanguage\":\"pt-BR\"},{\"@type\":\"Question\",\"@id\":\"https:\\\/\\\/helpsysadmin.com.br\\\/blog\\\/otimizar-disco-vps-linux\\\/#faq-question-1778966788595\",\"position\":6,\"url\":\"https:\\\/\\\/helpsysadmin.com.br\\\/blog\\\/otimizar-disco-vps-linux\\\/#faq-question-1778966788595\",\"name\":\"Com que frequ\u00eancia devo otimizar o disco do meu VPS Linux?\",\"answerCount\":1,\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\"Recomenda-se uma limpeza manual mensal e monitoramento automatizado cont\u00ednuo via cron. Configure alertas quando o uso ultrapassar 75\u201380% para ter tempo h\u00e1bil de agir antes de uma queda de servi\u00e7o.\",\"inLanguage\":\"pt-BR\"},\"inLanguage\":\"pt-BR\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Como Otimizar Disco em VPS Linux: Guia Completo 2026","description":"Aprenda a otimizar o disco em VPS Linux com comandos pr\u00e1ticos: df, du, logrotate e limpeza de pacotes. Libere espa\u00e7o e melhore a performance.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/helpsysadmin.com.br\/blog\/otimizar-disco-vps-linux\/","og_locale":"pt_BR","og_type":"article","og_title":"Como Otimizar Disco em VPS Linux: Guia Completo 2026","og_description":"Aprenda a otimizar o disco em VPS Linux com comandos pr\u00e1ticos: df, du, logrotate e limpeza de pacotes. Libere espa\u00e7o e melhore a performance.","og_url":"https:\/\/helpsysadmin.com.br\/blog\/otimizar-disco-vps-linux\/","og_site_name":"Blog HelpSysAdmin","article_published_time":"2026-05-16T21:34:29+00:00","article_modified_time":"2026-05-16T22:57:29+00:00","og_image":[{"width":1536,"height":1024,"url":"https:\/\/mlkpd8g42nae.i.optimole.com\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/helpsysadmin.com.br\/blog\/wp-content\/uploads\/2026\/05\/otimizar_disco_vps_linux.webp","type":"image\/webp"}],"author":"HelpSysAdmin","twitter_card":"summary_large_image","twitter_creator":"@brhelpsysad","twitter_site":"@brhelpsysad","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/helpsysadmin.com.br\/blog\/otimizar-disco-vps-linux\/#article","isPartOf":{"@id":"https:\/\/helpsysadmin.com.br\/blog\/otimizar-disco-vps-linux\/"},"author":{"name":"HelpSysAdmin","@id":"https:\/\/helpsysadmin.com.br\/blog\/#\/schema\/person\/bdbe3d7d71a0c6a3cb474c18da574efb"},"headline":"Como Otimizar Disco em VPS Linux: Guia Completo 2026","datePublished":"2026-05-16T21:34:29+00:00","dateModified":"2026-05-16T22:57:29+00:00","mainEntityOfPage":{"@id":"https:\/\/helpsysadmin.com.br\/blog\/otimizar-disco-vps-linux\/"},"wordCount":1941,"publisher":{"@id":"https:\/\/helpsysadmin.com.br\/blog\/#organization"},"image":{"@id":"https:\/\/helpsysadmin.com.br\/blog\/otimizar-disco-vps-linux\/#primaryimage"},"thumbnailUrl":"https:\/\/mlkpd8g42nae.i.optimole.com\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/helpsysadmin.com.br\/blog\/wp-content\/uploads\/2026\/05\/otimizar_disco_vps_linux.webp","articleSection":["Performance e Otimiza\u00e7\u00e3o (Tuning)"],"inLanguage":"pt-BR"},{"@type":["WebPage","FAQPage"],"@id":"https:\/\/helpsysadmin.com.br\/blog\/otimizar-disco-vps-linux\/","url":"https:\/\/helpsysadmin.com.br\/blog\/otimizar-disco-vps-linux\/","name":"Como Otimizar Disco em VPS Linux: Guia Completo 2026","isPartOf":{"@id":"https:\/\/helpsysadmin.com.br\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/helpsysadmin.com.br\/blog\/otimizar-disco-vps-linux\/#primaryimage"},"image":{"@id":"https:\/\/helpsysadmin.com.br\/blog\/otimizar-disco-vps-linux\/#primaryimage"},"thumbnailUrl":"https:\/\/mlkpd8g42nae.i.optimole.com\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/helpsysadmin.com.br\/blog\/wp-content\/uploads\/2026\/05\/otimizar_disco_vps_linux.webp","datePublished":"2026-05-16T21:34:29+00:00","dateModified":"2026-05-16T22:57:29+00:00","description":"Aprenda a otimizar o disco em VPS Linux com comandos pr\u00e1ticos: df, du, logrotate e limpeza de pacotes. Libere espa\u00e7o e melhore a performance.","breadcrumb":{"@id":"https:\/\/helpsysadmin.com.br\/blog\/otimizar-disco-vps-linux\/#breadcrumb"},"mainEntity":[{"@id":"https:\/\/helpsysadmin.com.br\/blog\/otimizar-disco-vps-linux\/#faq-question-1778966613131"},{"@id":"https:\/\/helpsysadmin.com.br\/blog\/otimizar-disco-vps-linux\/#faq-question-1778966652126"},{"@id":"https:\/\/helpsysadmin.com.br\/blog\/otimizar-disco-vps-linux\/#faq-question-1778966678094"},{"@id":"https:\/\/helpsysadmin.com.br\/blog\/otimizar-disco-vps-linux\/#faq-question-1778966703535"},{"@id":"https:\/\/helpsysadmin.com.br\/blog\/otimizar-disco-vps-linux\/#faq-question-1778966731717"},{"@id":"https:\/\/helpsysadmin.com.br\/blog\/otimizar-disco-vps-linux\/#faq-question-1778966788595"}],"inLanguage":"pt-BR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/helpsysadmin.com.br\/blog\/otimizar-disco-vps-linux\/"]}]},{"@type":"ImageObject","inLanguage":"pt-BR","@id":"https:\/\/helpsysadmin.com.br\/blog\/otimizar-disco-vps-linux\/#primaryimage","url":"https:\/\/mlkpd8g42nae.i.optimole.com\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/helpsysadmin.com.br\/blog\/wp-content\/uploads\/2026\/05\/otimizar_disco_vps_linux.webp","contentUrl":"https:\/\/mlkpd8g42nae.i.optimole.com\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/helpsysadmin.com.br\/blog\/wp-content\/uploads\/2026\/05\/otimizar_disco_vps_linux.webp","width":1536,"height":1024,"caption":"otimizar disco vps linux"},{"@type":"BreadcrumbList","@id":"https:\/\/helpsysadmin.com.br\/blog\/otimizar-disco-vps-linux\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/helpsysadmin.com.br\/blog\/"},{"@type":"ListItem","position":2,"name":"Como Otimizar Disco em VPS Linux: Guia Completo 2026"}]},{"@type":"WebSite","@id":"https:\/\/helpsysadmin.com.br\/blog\/#website","url":"https:\/\/helpsysadmin.com.br\/blog\/","name":"Blog HelpSysAdmin","description":"Webserver linux blog","publisher":{"@id":"https:\/\/helpsysadmin.com.br\/blog\/#organization"},"alternateName":"HelpSysAdmin Blog","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/helpsysadmin.com.br\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"pt-BR"},{"@type":"Organization","@id":"https:\/\/helpsysadmin.com.br\/blog\/#organization","name":"HelpSysAdmin Gerenciamento de Servidores","alternateName":"HelpSysAdmin","url":"https:\/\/helpsysadmin.com.br\/blog\/","logo":{"@type":"ImageObject","inLanguage":"pt-BR","@id":"https:\/\/helpsysadmin.com.br\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/mlkpd8g42nae.i.optimole.com\/w:512\/h:512\/q:mauto\/f:best\/https:\/\/helpsysadmin.com.br\/blog\/wp-content\/uploads\/2020\/12\/favicon.png","contentUrl":"https:\/\/mlkpd8g42nae.i.optimole.com\/w:512\/h:512\/q:mauto\/f:best\/https:\/\/helpsysadmin.com.br\/blog\/wp-content\/uploads\/2020\/12\/favicon.png","width":512,"height":512,"caption":"HelpSysAdmin Gerenciamento de Servidores"},"image":{"@id":"https:\/\/helpsysadmin.com.br\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/x.com\/brhelpsysad","https:\/\/mastodon.social\/@helpsysadmin"],"description":"Oferecemos o gerenciamento de servidores dedicados, vps ou cloud. Apresentamos a melhor experi\u00eancia em atendimento e servi\u00e7o. Nosso time cuidar\u00e1 do seu servidor com backups, an\u00e1lises constantes, ajustes de seguran\u00e7a, realiza\u00e7\u00e3o de manuten\u00e7\u00e3o preventiva e corretiva, otimiza\u00e7\u00e3o de performance al\u00e9m de monitoramento 24\u00d77 com suporte Pr\u00f3 Ativo.","numberOfEmployees":{"@type":"QuantitativeValue","minValue":"1","maxValue":"10"}},{"@type":"Person","@id":"https:\/\/helpsysadmin.com.br\/blog\/#\/schema\/person\/bdbe3d7d71a0c6a3cb474c18da574efb","name":"HelpSysAdmin","image":{"@type":"ImageObject","inLanguage":"pt-BR","@id":"https:\/\/secure.gravatar.com\/avatar\/efc0007e6a313a844b72de257e05c6083b07b6ecc6983a4f71e06293ff2e22fd?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/efc0007e6a313a844b72de257e05c6083b07b6ecc6983a4f71e06293ff2e22fd?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/efc0007e6a313a844b72de257e05c6083b07b6ecc6983a4f71e06293ff2e22fd?s=96&d=mm&r=g","caption":"HelpSysAdmin"},"sameAs":["https:\/\/helpsysadmin.com.br\/blog\/"]},{"@type":"Question","@id":"https:\/\/helpsysadmin.com.br\/blog\/otimizar-disco-vps-linux\/#faq-question-1778966613131","position":1,"url":"https:\/\/helpsysadmin.com.br\/blog\/otimizar-disco-vps-linux\/#faq-question-1778966613131","name":"Como verificar o uso do disco em um VPS Linux?","answerCount":1,"acceptedAnswer":{"@type":"Answer","text":"Use o comando df -h para visualizar o espa\u00e7o dispon\u00edvel em cada parti\u00e7\u00e3o montada. Para identificar quais pastas consomem mais espa\u00e7o, execute du -sh \/* ou instale o ncdu para uma interface de terminal interativa.","inLanguage":"pt-BR"},"inLanguage":"pt-BR"},{"@type":"Question","@id":"https:\/\/helpsysadmin.com.br\/blog\/otimizar-disco-vps-linux\/#faq-question-1778966652126","position":2,"url":"https:\/\/helpsysadmin.com.br\/blog\/otimizar-disco-vps-linux\/#faq-question-1778966652126","name":"Qual o comando para limpar o cache de pacotes no Ubuntu\/VPS Linux?","answerCount":1,"acceptedAnswer":{"@type":"Answer","text":"Execute apt autoremove --purge &amp;&amp; apt clean no terminal. Isso remove pacotes \u00f3rf\u00e3os e limpa o cache do APT, podendo liberar centenas de MB ou at\u00e9 alguns GB de espa\u00e7o.","inLanguage":"pt-BR"},"inLanguage":"pt-BR"},{"@type":"Question","@id":"https:\/\/helpsysadmin.com.br\/blog\/otimizar-disco-vps-linux\/#faq-question-1778966678094","position":3,"url":"https:\/\/helpsysadmin.com.br\/blog\/otimizar-disco-vps-linux\/#faq-question-1778966678094","name":"Como configurar logrotate para otimizar o disco no servidor Linux?","answerCount":1,"acceptedAnswer":{"@type":"Answer","text":"Crie ou edite um arquivo em \/etc\/logrotate.d\/ com as diretivas: daily, rotate 7, compress, missingok e notifempty. Isso garante que logs antigos sejam comprimidos e removidos automaticamente.","inLanguage":"pt-BR"},"inLanguage":"pt-BR"},{"@type":"Question","@id":"https:\/\/helpsysadmin.com.br\/blog\/otimizar-disco-vps-linux\/#faq-question-1778966703535","position":4,"url":"https:\/\/helpsysadmin.com.br\/blog\/otimizar-disco-vps-linux\/#faq-question-1778966703535","name":"Como remover kernels antigos para liberar espa\u00e7o em \/boot no Linux?","answerCount":1,"acceptedAnswer":{"@type":"Answer","text":"No Debian\/Ubuntu, liste os kernels com dpkg --list | grep linux-image, identifique o kernel atual com uname -r, e remova os desnecess\u00e1rios com apt purge linux-image-X.X.X-generic. Mantenha sempre ao menos o kernel atual e o anterior.","inLanguage":"pt-BR"},"inLanguage":"pt-BR"},{"@type":"Question","@id":"https:\/\/helpsysadmin.com.br\/blog\/otimizar-disco-vps-linux\/#faq-question-1778966731717","position":5,"url":"https:\/\/helpsysadmin.com.br\/blog\/otimizar-disco-vps-linux\/#faq-question-1778966731717","name":"Docker est\u00e1 consumindo muito disco no VPS \u2014 como resolver?","answerCount":1,"acceptedAnswer":{"@type":"Answer","text":"Execute docker system prune -a --volumes para remover imagens, containers parados e volumes n\u00e3o utilizados. Antes, verifique o consumo atual com docker system df. Esse comando pode liberar v\u00e1rios gigabytes em servidores com uso intenso de containers.","inLanguage":"pt-BR"},"inLanguage":"pt-BR"},{"@type":"Question","@id":"https:\/\/helpsysadmin.com.br\/blog\/otimizar-disco-vps-linux\/#faq-question-1778966788595","position":6,"url":"https:\/\/helpsysadmin.com.br\/blog\/otimizar-disco-vps-linux\/#faq-question-1778966788595","name":"Com que frequ\u00eancia devo otimizar o disco do meu VPS Linux?","answerCount":1,"acceptedAnswer":{"@type":"Answer","text":"Recomenda-se uma limpeza manual mensal e monitoramento automatizado cont\u00ednuo via cron. Configure alertas quando o uso ultrapassar 75\u201380% para ter tempo h\u00e1bil de agir antes de uma queda de servi\u00e7o.","inLanguage":"pt-BR"},"inLanguage":"pt-BR"}]}},"lang":"pt","translations":{"pt":6958},"pll_sync_post":{},"_links":{"self":[{"href":"https:\/\/helpsysadmin.com.br\/blog\/wp-json\/wp\/v2\/posts\/6958","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/helpsysadmin.com.br\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/helpsysadmin.com.br\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/helpsysadmin.com.br\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/helpsysadmin.com.br\/blog\/wp-json\/wp\/v2\/comments?post=6958"}],"version-history":[{"count":4,"href":"https:\/\/helpsysadmin.com.br\/blog\/wp-json\/wp\/v2\/posts\/6958\/revisions"}],"predecessor-version":[{"id":6969,"href":"https:\/\/helpsysadmin.com.br\/blog\/wp-json\/wp\/v2\/posts\/6958\/revisions\/6969"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/helpsysadmin.com.br\/blog\/wp-json\/wp\/v2\/media\/6959"}],"wp:attachment":[{"href":"https:\/\/helpsysadmin.com.br\/blog\/wp-json\/wp\/v2\/media?parent=6958"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/helpsysadmin.com.br\/blog\/wp-json\/wp\/v2\/categories?post=6958"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/helpsysadmin.com.br\/blog\/wp-json\/wp\/v2\/tags?post=6958"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}