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
- Connect with SSH. Commands use
sudoso they can read every folder; root users can leave it out. - First see which disk is full with
df -h. See check disk space. - If the disk is already 100% full and services are failing, also read fix “No space left on device”.
How to install ncdu
ncdu (NCurses Disk Usage) is an interactive version ofdu.
- Ubuntu / Debian
- AlmaLinux / Rocky
- Fedora / Arch
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.How to find large files without ncdu
List every file over 1 GB on the root file system: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: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 withdf -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 withSystemMaxUse=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.Related guides
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:- Live Chat: Quick assistance via our website.
- Support Ticket: Open a Ticket
- Discord: Join our Community
- Email: support@freakhosting.com
Last Updated: November 2026