I'm running out of space on my root partition. Currently, I'm using

uname -a
Linux thinkpad-nc 4.9.0-9-amd64 #1 SMP Debian 4.9.168-1+deb9u2 (2019-05-13) x86_64 GNU/Linux

Here is an output of df:

df -h
Filesystem      Size  Used Avail Use% Mounted on
udev             16G     0   16G   0% /dev
tmpfs           3.2G   18M  3.2G   1% /run
/dev/nvme0n1p2   28G   26G  226M 100% /
tmpfs            16G  234M   16G   2% /dev/shm
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs            16G     0   16G   0% /sys/fs/cgroup
/dev/nvme0n1p4  410G   86G  303G  23% /home
/dev/nvme0n1p1  511M  132K  511M   1% /boot/efi
tmpfs           3.2G  4.0K  3.2G   1% /run/user/112
tmpfs           3.2G   20K  3.2G   1% /run/user/1000

I have already done an autoclean and removed not needed linux headers. What else can I do or how can I inspect what is going on.


1 Answer 1


You could use du or ncdu to inspect which folders hold the most content. ncdu is more powerful and you can navigate the folders interactively, whereas du is a one-shot. It might be necessary to install ncdu.

For ncdu a typical command call would be as follows, to inspect your root file system and to not descent into other file systems.

ncdu -x /

Calling du to get an overview would be as follows. But you also could increase the --max-depth to also list descendant directories.

du -hx --max-depth=1 / | sort -h

This is only the first step to find which folders hold the most content. Second would be to delete things, but that depends on what you find and if corresponding files can be deleted.
I would first start to look for old log files or large log files which may be filled rapidly by a misbehaving service.


Not the answer you're looking for? Browse other questions tagged .