natbox.io

Blog / Disk space

Disk full? Find what is filling your server, and clean it up safely

7 November 2026 · Tutorial · By Mohammad AlSaraf

When a disk fills up, apps start failing in odd ways: databases stop writing, updates break halfway, and logins can get slow. Small servers fill up faster, so it pays to know where the space goes. Here is how to find out in a few minutes, and what is safe to delete.

About 10 minutes. Debian and Ubuntu commands; the checks work the same on AlmaLinux and Alpine.

1. How full is the disk?

df -h shows a 5.2 GB disk with 1.9 GB used, 37 percent

df -h / shows the size of your disk, how much is used and how much is left. On your server the first column shows your own server's name. The Graphs tab in the client area shows the same number. Above about 85% it is time to clean up.

2. Which folders are big?

du adds up folder sizes. Start at the top and work down into the biggest folder:

du shows /root at 901 MB and /var at 722 MB; inside /var, /var/log is 641 MB
The -x keeps du on your disk, and sort -h puts the biggest last.

3. Or browse it with ncdu

ncdu does the same thing with a menu you can move around in with the arrow keys and Enter. Press d on a file to delete it (it asks first) and q to quit.

apt install -y ncdu
ncdu -x /
ncdu showing /root as the biggest folder at 900 MB

4. List the biggest files

Usually a few large files are to blame. This lists every file over 100 MB:

find lists a 900 MB old backup archive and a 640 MB log file

Here it is an old backup someone forgot about, and an app log that was never rotated.

5. Clean up safely

After cleaning: 371 MB used, 7 percent

From 37% to 7% used.

Snapshots use disk space too

Snapshots you take in the client area's Snapshots tab are stored on your server's disk, so a snapshot keeps the files it saved, even after you delete them. If space is tight, delete snapshots you no longer need. More in the docs.

Stop it happening again

Still short of space? You can move to a bigger plan from the client area at any time. See the plans.

Get new tutorials in Telegram. Follow @natboxio: every new post, plus short server tips.

More from the blog: Keep commands running after you disconnect, with tmux, What's new at natbox: Telegram bot, snapshots, keeping your trial and CaptchaBox, Welcome to the natbox blog, and our new video library. RSS feed.