You will find here how to discover which directory or file is using your disk space, and therefore where makes more sence to start erasing files.

This is assuming you have all partitions in one disk, if not, do not run this command at the root level, but at each mount point of every disk you have.
<!–break–>
I will apply this on my own hard disk, I have in my Desktop PC all directories on the same disk.

cd /

sudo du -s * | sort -n

Here is my result.

0       proc
0       sys
4       libsmbios_c
12      mnt
16      lost+found
20      media
36      tmp
184     dev
376     root
4356    bin
9252    etc
12007   boot
12800   sbin
70480   srv
94784   lib
332756  opt
4602136 usr
7439864 var
15018948        home

Now go let’s say to /var

cd /var

sudo du -s * | sort -n

And here is my result.

0       mail
4       empty
4       local
4       opt
8       games
8       lock
32      abs
160     run
1564    spool
8956    tmp
48228   log
112820  lib
7268072 cache

As I am using Arch Linux in my Desktop PC /var/cache is one of the biggest directory as there are stored the binaries from every upgrade I made to the system.

You can keep going inside each directory to finally find which is the one causing you running out of space.

Advertisements