Skip to main content
To find what is using disk space on Linux, install ncdu and run sudo ncdu -x /. It lists folders from largest to smallest; press Enter to open one. To list big files, run sudo find / -xdev -type f -size +1G -exec ls -lh {} +. If df shows a full disk but you find nothing, run sudo lsof +L1 to spot deleted files still held open.

Before you start

How to install ncdu

ncdu (NCurses Disk Usage) is an interactive version of du.

How to find what is using disk space with ncdu

1

Scan the disk

-x stays on one file system, so it skips other disks and /proc. Scanning a large disk can take a minute.
2

Browse by size

The biggest folders are at the top. Use the arrow keys to move, Enter (or right arrow) to open a folder and the left arrow to go back.
3

Find the cause

Keep opening the largest folder until you reach the files that use the space, for example /var/log/journal or /var/lib/docker.
d deletes for good, with no recycle bin. Never delete system folders such as /usr, /lib, /boot or /var/lib/dpkg, or database files in /var/lib/mysql: that breaks the server. To browse safely with no delete key, use sudo ncdu -x -r / (read-only).

How to find large files without ncdu

List every file over 1 GB on the root file system:
Or see the largest folders, one level at a time:

What usually fills a Linux server’s disk?

Why does df show a full disk when du does not?

A file that was deleted while a program still has it open keeps using space until that program closes it. Find such files:
Restart that service to free the space, for example sudo systemctl restart nginx. See manage services with systemctl.

Frequently asked questions

What does “No space left on device” mean when df shows free space?

You may have run out of inodes (the slots that track files), usually because of millions of tiny files such as sessions or cache. Check with df -i. If IUse% is 100%, find the folder with the most files and clean it up.

Is it safe to delete files in /var/log?

Old rotated logs (.1, .gz) are safe to delete. For the current log of a running service, use truncate -s 0 instead of rm, so the service keeps writing to the same file.

How do I make the server stop filling up again?

Limit the journal with SystemMaxUse=500M in /etc/systemd/journald.conf, make sure logrotate runs, clean Docker regularly and keep backups off the server. Monitoring alerts help too: see email alerts when your server goes down.

How do I get more disk space on my VPS?

Upgrade to a plan with a bigger disk, then resize the partition. See VPS storage.

VPS and dedicated server guides

Every guide in this section.

Check disk space

df and du basics.

Fix No space left on device

When the disk is already full.

Clean up Docker disk space

Remove unused images and volumes.

Resize after a disk upgrade

Use the space from a bigger plan.

Checked against the official ncdu manual on 4 November 2026; ncdu -x, find -size +1G, du | sort -h, lsof +L1 with a deleted open file, df -i and journalctl --vacuum-size options tested on Ubuntu 24.04 LTS (ncdu 1.19). Commands can differ on other distributions or releases.

Need Extra Help?

If you encounter any issues, our support team is ready to assist:

Save on Your Hosting

Ready to upgrade your hosting? Use code KB20 at checkout for 20% off your first order!

Last Updated: November 2026