{"id":2312,"date":"2026-03-31T17:50:43","date_gmt":"2026-03-31T17:50:43","guid":{"rendered":"https:\/\/veerhost.com\/docs\/fix-vps-running-out-of-disk-space\/"},"modified":"2026-03-31T17:54:49","modified_gmt":"2026-03-31T17:54:49","slug":"fix-vps-running-out-of-disk-space","status":"publish","type":"docs","link":"https:\/\/veerhost.com\/de\/docs\/vps\/fix-vps-running-out-of-disk-space\/","title":{"rendered":"Fix: VPS Running Out of Disk Space"},"content":{"rendered":"<p class=\"wp-block-paragraph\">If your VPS disk is full or nearly full, services like MySQL, Nginx, and PHP can crash or refuse to start. Here&#8217;s how to find what&#8217;s eating your disk and free up space fast.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 1: Check Current Disk Usage<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>df -h<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Look at the <code>Use%<\/code> column for your main partition (usually <code>\/<\/code>). If it&#8217;s at 90%+ you need to act now.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 2: Find the Largest Files and Folders<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Find the top disk-consuming directories:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>du -h --max-depth=1 \/ 2>\/dev\/null | sort -rh | head -20<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Then drill into large folders. For example, if <code>\/var<\/code> is large:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>du -h --max-depth=1 \/var | sort -rh | head -10<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Step 3: Clear Old System Logs<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Logs are one of the most common causes of disk bloat. Clean old logs safely:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># Remove old compressed logs\nsudo find \/var\/log -name \"*.gz\" -delete\nsudo find \/var\/log -name \"*.1\" -delete\n\n# Truncate large active logs (don't delete them, just empty them)\nsudo truncate -s 0 \/var\/log\/syslog\nsudo truncate -s 0 \/var\/log\/auth.log<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Step 4: Clean Unused Packages and Cache<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code># Remove unused packages and old kernels\nsudo apt autoremove -y\n\n# Clear the apt package cache\nsudo apt clean<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Step 5: Find and Remove Large Files<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Find all files larger than 100MB on your server:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>find \/ -type f -size +100M 2>\/dev\/null | sort -rh<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Common culprits: old database dumps (<code>.sql<\/code>, <code>.sql.gz<\/code>), large backup files, and Docker images. Delete anything you no longer need.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 6: Clean Docker (If Installed)<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Docker can accumulate unused images, containers, and volumes that take gigabytes of space:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># Remove all stopped containers, unused images, volumes, and networks\ndocker system prune -af --volumes<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Warning:<\/strong> This removes all stopped containers and unused images. Running containers are not affected.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 7: Upgrade Your Plan<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">If disk usage is consistently high after cleanup, it may be time to upgrade to a larger VPS plan. Contact Veerhost support at <a href=\"https:\/\/veerhost.com\/de\/support\/\">veerhost.com\/support<\/a> to discuss options.<\/p>","protected":false},"excerpt":{"rendered":"<p>If your VPS disk is full or nearly full, services like MySQL, Nginx, and PHP can crash or refuse to start. Here&#8217;s [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":1967,"menu_order":9,"comment_status":"open","ping_status":"closed","template":"","doc_tag":[],"class_list":["post-2312","docs","type-docs","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/veerhost.com\/de\/wp-json\/wp\/v2\/docs\/2312","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/veerhost.com\/de\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/veerhost.com\/de\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/veerhost.com\/de\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/veerhost.com\/de\/wp-json\/wp\/v2\/comments?post=2312"}],"version-history":[{"count":1,"href":"https:\/\/veerhost.com\/de\/wp-json\/wp\/v2\/docs\/2312\/revisions"}],"predecessor-version":[{"id":2316,"href":"https:\/\/veerhost.com\/de\/wp-json\/wp\/v2\/docs\/2312\/revisions\/2316"}],"up":[{"embeddable":true,"href":"https:\/\/veerhost.com\/de\/wp-json\/wp\/v2\/docs\/1967"}],"wp:attachment":[{"href":"https:\/\/veerhost.com\/de\/wp-json\/wp\/v2\/media?parent=2312"}],"wp:term":[{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/veerhost.com\/de\/wp-json\/wp\/v2\/doc_tag?post=2312"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}