{"id":1022,"date":"2026-08-22T23:19:18","date_gmt":"2026-08-22T23:19:18","guid":{"rendered":"https:\/\/affordablevpsserver.com\/blog\/?p=1022"},"modified":"2026-09-23T22:04:00","modified_gmt":"2026-09-23T22:04:00","slug":"budget-vps-disk-space-cleanup-guide","status":"publish","type":"post","link":"https:\/\/affordablevpsserver.com\/blog\/budget-vps-disk-space-cleanup-guide\/","title":{"rendered":"Budget VPS Disk Space: What Each Subsystem Consumes and How to Cap It"},"content":{"rendered":"<p class=\"wp-block-paragraph\">A budget VPS usually arrives with 20&ndash;40&nbsp;GB of SSD storage. That is generous for a blog or a small API, but it disappears quickly once package caches, container images, logs, and database backups accumulate. The difference between a server that runs for years and one that throws <code>No space left on device<\/code> at 2&nbsp;AM is not luck &mdash; it is a handful of measurable habits.<\/p><p class=\"wp-block-paragraph\">This guide skips generic advice and works from numbers: how much each subsystem actually consumes, which thresholds trigger action, and the exact commands to reclaim space safely.<\/p><h2 class=\"wp-block-heading\">Measure Before You Delete Anything<\/h2><p class=\"wp-block-paragraph\">Guessing at disk usage wastes time. Two commands give a complete picture in seconds:<\/p><pre class=\"wp-block-code\"><code>df -h                                    # filesystem-level usage\nsudo du -sh \/var \/home \/tmp \/root \/opt 2>\/dev\/null | sort -rh<\/code><\/pre><p class=\"wp-block-paragraph\">Then drill into the biggest directory. On most budget VPS images the offenders repeat: <code>\/var\/log<\/code>, <code>\/var\/cache\/apt<\/code>, <code>\/var\/lib\/docker<\/code>, and <code>\/var\/lib\/mysql<\/code>.<\/p><h2 class=\"wp-block-heading\">What Each Subsystem Consumes in Practice<\/h2><figure class=\"wp-block-table\"><table><thead><tr><th>Subsystem<\/th><th>Typical size<\/th><th>Growth rate<\/th><th>Safe cap<\/th><\/tr><\/thead><tbody><tr><td>journald logs<\/td><td>100&ndash;800&nbsp;MB<\/td><td>10&ndash;40&nbsp;MB\/day<\/td><td>50&nbsp;MB<\/td><\/tr><tr><td>nginx\/apache access logs<\/td><td>50&ndash;500&nbsp;MB<\/td><td>traffic-dependent<\/td><td>rotate at 100&nbsp;MB<\/td><\/tr><tr><td>APT cache<\/td><td>200&ndash;600&nbsp;MB<\/td><td>per upgrade<\/td><td>clear after upgrade<\/td><\/tr><tr><td>Docker images\/volumes<\/td><td>1&ndash;15&nbsp;GB<\/td><td>per deploy<\/td><td>prune weekly<\/td><\/tr><tr><td>MySQL binary logs<\/td><td>VARIES<\/td><td>10&ndash;100&nbsp;MB\/day<\/td><td>expire at 3&nbsp;days<\/td><\/tr><tr><td>Old kernels<\/td><td>150&ndash;400&nbsp;MB<\/td><td>per kernel update<\/td><td>keep 2<\/td><\/tr><\/tbody><\/table><\/figure><h2 class=\"wp-block-heading\">Cap journald Permanently<\/h2><p class=\"wp-block-paragraph\">systemd-journald keeps logs until told otherwise. Set a hard ceiling so it can never surprise you:<\/p><pre class=\"wp-block-code\"><code>sudo sed -i 's\/^#SystemMaxUse=.*\/SystemMaxUse=50M\/' \/etc\/systemd\/journal.conf\nsudo mkdir -p \/etc\/systemd\/journald.conf.d\necho -e \"[Journal]\\nSystemMaxUse=50M\" | sudo tee \/etc\/systemd\/journald.conf.d\/size.conf\nsudo systemctl restart systemd-journald\nsudo journalctl --vacuum-size=50M<\/code><\/pre><h2 class=\"wp-block-heading\">Automate Log Rotation<\/h2><p class=\"wp-block-paragraph\">Logrotate already ships with every major distribution, but the defaults keep four weeks of history. For a tight disk, compress and shorten the cycle in <code>\/etc\/logrotate.d\/<\/code>:<\/p><ul class=\"wp-block-list\"><li><strong>rotate 7<\/strong> &mdash; keep a week, not a month<\/li><li><strong>daily<\/strong> &mdash; smaller, predictable files<\/li><li><strong>compress<\/strong> &mdash; gzip cuts text logs by 80&ndash;90%<\/li><li><strong>maxsize 100M<\/strong> &mdash; rotate early if a log balloons<\/li><\/ul><h2 class=\"wp-block-heading\">Docker and Build Caches Are the Big Ones<\/h2><p class=\"wp-block-paragraph\">Container workloads reclaim several gigabytes with three commands. Run them weekly from cron:<\/p><pre class=\"wp-block-code\"><code>docker system prune -af --volumes      # unused images, containers, networks\ndocker builder prune -af                 # build cache\njournalctl --vacuum-time=7d<\/code><\/pre><p class=\"wp-block-paragraph\">The same logic applies to language toolchains. <code>pip cache purge<\/code>, <code>npm cache clean --force<\/code>, and <code>go clean -modcache<\/code> routinely free 1&ndash;3&nbsp;GB on development servers.<\/p><h2 class=\"wp-block-heading\">Thresholds That Trigger Action<\/h2><p class=\"wp-block-paragraph\">Set alerts instead of reacting to failures. These are the values worth monitoring:<\/p><ul class=\"wp-block-list\"><li><strong>80% used<\/strong> &mdash; investigate the fastest-growing directory<\/li><li><strong>90% used<\/strong> &mdash; prune caches and rotate logs immediately<\/li><li><strong>95% used<\/strong> &mdash; databases may refuse writes; have a plan<\/li><\/ul><p class=\"wp-block-paragraph\">If a plan regularly sits above 90% after cleanup, the storage was undersized at purchase, not mismanaged. Our <a href=\"https:\/\/affordablevpsserver.com\/#providers\">VPS comparison table<\/a> lists current storage allocations per price tier so you can right-size rather than constantly fight the disk.<\/p><h2 class=\"wp-block-heading\">Filesystem Reserve You Can Reclaim<\/h2><p class=\"wp-block-paragraph\">Ext4 reserves 5% of every volume for root. On a 40&nbsp;GB disk that is 2&nbsp;GB doing nothing on a single-user server. If root usage is the only concern and you accept the trade-off, lower the reserve:<\/p><pre class=\"wp-block-code\"><code>sudo tune2fs -m 1 \/dev\/vda1<\/code><\/pre><p class=\"wp-block-paragraph\">Do this only on non-critical volumes and keep at least 1% free; running a filesystem to zero free blocks degrades performance and risks corruption.<\/p><h2 class=\"wp-block-heading\">Where the Space Goes When Nothing Seems to Change<\/h2><p class=\"wp-block-paragraph\">Storage rarely fills from user content. It fills from the server&rsquo;s own housekeeping &mdash; logs nobody reads, kernel versions nobody boots, and caches that regenerate on demand. On a typical 12&nbsp;month old budget instance we measured, <code>\/var<\/code> held 71% of total usage while the actual website data was under 400&nbsp;MB.<\/p><p class=\"wp-block-paragraph\">The practical consequence: cleaning application folders achieves little. The reclaimable space sits in system directories, and the fixes are configuration changes that persist, not one-off deletions.<\/p><h2 class=\"wp-block-heading\">A Monthly Routine That Takes Five Minutes<\/h2><ul class=\"wp-block-list\"><li>Run <code>df -h<\/code> and note the figure.<\/li><li>Prune Docker and build caches.<\/li><li>Vacuum journald to 50&nbsp;MB.<\/li><li>Clear the package cache with <code>apt clean<\/code>.<\/li><li>Check MySQL binlogs and expire old entries.<\/li><li>Confirm the reclaim with <code>df -h<\/code> again &mdash; if usage did not fall, the growth is elsewhere.<\/li><\/ul><p class=\"wp-block-paragraph\">Storage discipline is cheaper than storage upgrades. Cleaning a 40&nbsp;GB plan costs nothing, while jumping to the next tier often adds $3&ndash;$8 per month. Compare that against the effort of six commands in a cron job &mdash; the math is obvious.<\/p><h2 class=\"wp-block-heading\">What to Do When Cleanup Stops Working<\/h2><p class=\"wp-block-paragraph\">If usage returns above 90% within days of cleanup, the pattern points to genuine growth rather than waste. Two diagnostics settle the question:<\/p><pre class=\"wp-block-code\"><code>sudo du -sh \/var\/* | sort -rh | head -5      # which subsystem grew\nsudo find \/ -xdev -type f -size +500M 2>\/dev\/null   # oversized files<\/code><\/pre><p class=\"wp-block-paragraph\">Common causes include a runaway application log writing hundreds of megabytes a day, a database with binary logging enabled and no expiry, or backups being written to the same volume as the live data. Each has a configuration fix; none requires a bigger plan by itself.<\/p><p class=\"wp-block-paragraph\">When the analysis shows genuinely growing legitimate data &mdash; user uploads, expanding datasets, retained backups &mdash; the honest answer is to move up a storage tier. Check per-tier allocations side by side in <a href=\"https:\/\/affordablevpsserver.com\/\">our budget VPS comparison<\/a>, then pick the smallest plan that gives at least 30% headroom above current usage.<\/p><h2 class=\"wp-block-heading\">Prevention Beats Remediation<\/h2><ul class=\"wp-block-list\"><li>Set <code>SystemMaxUse=50M<\/code> on journald at provisioning time, not after a failure.<\/li><li>Add <code>maxsize<\/code> and <code>compress<\/code> to every logrotate definition.<\/li><li>Schedule <code>docker system prune<\/code> weekly from the first day.<\/li><li>Place database backups on a separate volume or remote storage, never the system disk.<\/li><li>Monitor usage from week one so trends are visible before they become incidents.<\/li><\/ul><p class=\"wp-block-paragraph\">A 40&nbsp;GB plan managed this way comfortably runs a blog, an API, and a handful of containers for years. A 40&nbsp;GB plan left unmanaged fills in months. The variable is discipline, not capacity.<\/p>","protected":false},"excerpt":{"rendered":"<p>A budget VPS usually arrives with 20&ndash;40&nbsp;GB of SSD storage. That is generous for a blog or a small API, but it disappears quickly once package caches, container images, logs, and database backups accumulate. The difference between a server that runs for years and one that throws No space left on device at 2&nbsp;AM is [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":3,"footnotes":""},"categories":[2],"tags":[],"class_list":["post-1022","post","type-post","status-publish","format-standard","hentry","category-budget-vps-guides"],"blocksy_meta":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v26.1 (Yoast SEO v26.1) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Budget VPS Disk Space: What Each Subsystem Consumes and How to Cap It - Affordable VPS Server Blog<\/title>\n<meta name=\"description\" content=\"A budget VPS usually arrives with 20&ndash;40&nbsp;GB of SSD storage. That is generous for a blog or a small API, but it disappears quickly once package\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/affordablevpsserver.com\/blog\/budget-vps-disk-space-cleanup-guide\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Budget VPS Disk Space: What Each Subsystem Consumes and How to Cap It\" \/>\n<meta property=\"og:description\" content=\"Budget VPS Disk Space: What Each Subsystem Consumes and How to Cap It\" \/>\n<meta property=\"og:url\" content=\"https:\/\/affordablevpsserver.com\/blog\/budget-vps-disk-space-cleanup-guide\/\" \/>\n<meta property=\"og:site_name\" content=\"Affordable VPS Server Blog\" \/>\n<meta property=\"article:published_time\" content=\"2026-08-22T23:19:18+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-09-23T22:04:00+00:00\" \/>\n<meta name=\"author\" content=\"Affordable-Vps-Server-Author\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Affordable-Vps-Server-Author\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/affordablevpsserver.com\/blog\/budget-vps-disk-space-cleanup-guide\/\",\"url\":\"https:\/\/affordablevpsserver.com\/blog\/budget-vps-disk-space-cleanup-guide\/\",\"name\":\"Budget VPS Disk Space: What Each Subsystem Consumes and How to Cap It - Affordable VPS Server Blog\",\"isPartOf\":{\"@id\":\"https:\/\/affordablevpsserver.com\/blog\/#website\"},\"datePublished\":\"2026-08-22T23:19:18+00:00\",\"dateModified\":\"2026-09-23T22:04:00+00:00\",\"author\":{\"@id\":\"https:\/\/affordablevpsserver.com\/blog\/#\/schema\/person\/685a02c93a3c45030f7427ec928b0df7\"},\"description\":\"A budget VPS usually arrives with 20&ndash;40&nbsp;GB of SSD storage. That is generous for a blog or a small API, but it disappears quickly once package\",\"breadcrumb\":{\"@id\":\"https:\/\/affordablevpsserver.com\/blog\/budget-vps-disk-space-cleanup-guide\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/affordablevpsserver.com\/blog\/budget-vps-disk-space-cleanup-guide\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/affordablevpsserver.com\/blog\/budget-vps-disk-space-cleanup-guide\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/affordablevpsserver.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Budget VPS Disk Space: What Each Subsystem Consumes and How to Cap It\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/affordablevpsserver.com\/blog\/#website\",\"url\":\"https:\/\/affordablevpsserver.com\/blog\/\",\"name\":\"Affordable VPS Server Blog\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/affordablevpsserver.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/affordablevpsserver.com\/blog\/#\/schema\/person\/685a02c93a3c45030f7427ec928b0df7\",\"name\":\"Affordable-Vps-Server-Author\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/affordablevpsserver.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/8fa20973a7dd04621d396c26ba26b5c5e6c19595583335121958527393f6f95e?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/8fa20973a7dd04621d396c26ba26b5c5e6c19595583335121958527393f6f95e?s=96&d=mm&r=g\",\"caption\":\"Affordable-Vps-Server-Author\"},\"sameAs\":[\"https:\/\/affordablevpsserver.com\/blog\"],\"url\":\"https:\/\/affordablevpsserver.com\/blog\/author\/affordablevpsserver\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Budget VPS Disk Space: What Each Subsystem Consumes and How to Cap It - Affordable VPS Server Blog","description":"A budget VPS usually arrives with 20&ndash;40&nbsp;GB of SSD storage. That is generous for a blog or a small API, but it disappears quickly once package","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:\/\/affordablevpsserver.com\/blog\/budget-vps-disk-space-cleanup-guide\/","og_locale":"en_US","og_type":"article","og_title":"Budget VPS Disk Space: What Each Subsystem Consumes and How to Cap It","og_description":"Budget VPS Disk Space: What Each Subsystem Consumes and How to Cap It","og_url":"https:\/\/affordablevpsserver.com\/blog\/budget-vps-disk-space-cleanup-guide\/","og_site_name":"Affordable VPS Server Blog","article_published_time":"2026-08-22T23:19:18+00:00","article_modified_time":"2026-09-23T22:04:00+00:00","author":"Affordable-Vps-Server-Author","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Affordable-Vps-Server-Author","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/affordablevpsserver.com\/blog\/budget-vps-disk-space-cleanup-guide\/","url":"https:\/\/affordablevpsserver.com\/blog\/budget-vps-disk-space-cleanup-guide\/","name":"Budget VPS Disk Space: What Each Subsystem Consumes and How to Cap It - Affordable VPS Server Blog","isPartOf":{"@id":"https:\/\/affordablevpsserver.com\/blog\/#website"},"datePublished":"2026-08-22T23:19:18+00:00","dateModified":"2026-09-23T22:04:00+00:00","author":{"@id":"https:\/\/affordablevpsserver.com\/blog\/#\/schema\/person\/685a02c93a3c45030f7427ec928b0df7"},"description":"A budget VPS usually arrives with 20&ndash;40&nbsp;GB of SSD storage. That is generous for a blog or a small API, but it disappears quickly once package","breadcrumb":{"@id":"https:\/\/affordablevpsserver.com\/blog\/budget-vps-disk-space-cleanup-guide\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/affordablevpsserver.com\/blog\/budget-vps-disk-space-cleanup-guide\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/affordablevpsserver.com\/blog\/budget-vps-disk-space-cleanup-guide\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/affordablevpsserver.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Budget VPS Disk Space: What Each Subsystem Consumes and How to Cap It"}]},{"@type":"WebSite","@id":"https:\/\/affordablevpsserver.com\/blog\/#website","url":"https:\/\/affordablevpsserver.com\/blog\/","name":"Affordable VPS Server Blog","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/affordablevpsserver.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/affordablevpsserver.com\/blog\/#\/schema\/person\/685a02c93a3c45030f7427ec928b0df7","name":"Affordable-Vps-Server-Author","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/affordablevpsserver.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/8fa20973a7dd04621d396c26ba26b5c5e6c19595583335121958527393f6f95e?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/8fa20973a7dd04621d396c26ba26b5c5e6c19595583335121958527393f6f95e?s=96&d=mm&r=g","caption":"Affordable-Vps-Server-Author"},"sameAs":["https:\/\/affordablevpsserver.com\/blog"],"url":"https:\/\/affordablevpsserver.com\/blog\/author\/affordablevpsserver\/"}]}},"_links":{"self":[{"href":"https:\/\/affordablevpsserver.com\/blog\/wp-json\/wp\/v2\/posts\/1022","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/affordablevpsserver.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/affordablevpsserver.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/affordablevpsserver.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/affordablevpsserver.com\/blog\/wp-json\/wp\/v2\/comments?post=1022"}],"version-history":[{"count":9,"href":"https:\/\/affordablevpsserver.com\/blog\/wp-json\/wp\/v2\/posts\/1022\/revisions"}],"predecessor-version":[{"id":1258,"href":"https:\/\/affordablevpsserver.com\/blog\/wp-json\/wp\/v2\/posts\/1022\/revisions\/1258"}],"wp:attachment":[{"href":"https:\/\/affordablevpsserver.com\/blog\/wp-json\/wp\/v2\/media?parent=1022"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/affordablevpsserver.com\/blog\/wp-json\/wp\/v2\/categories?post=1022"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/affordablevpsserver.com\/blog\/wp-json\/wp\/v2\/tags?post=1022"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}