root partition full, what files / folders can I delete

Bijan Soleymani bijan at psq.com
Thu Feb 17 21:28:02 UTC 2022


I got used to some of the freeware open source GUI disk usage tools on 
windows.

There are some great ones for Linux too:
QDirStat
KDirStat

I think gnome has a tool called Disk Usage Analyzer / Baobab:
https://wiki.gnome.org/action/show/Apps/DiskUsageAnalyzer

In any case those tools are nice because they show you the largest disk 
usage.

You can get the same effect on the command line with:
sudo du -mx --max-depth=1 / | sort -n

That will give you the biggest top level directory.

I get:
...
2447    /lib
6808    /var
15808   /usr
679506  /home

(As you can see my home directory is part of the root partition)

Then if it's /tmp that is the biggest you can do:
sudo du -mx --max-depth=1 /home | sort -n

To see what's the biggest in /home

Etc.

Bijan

On 2022-02-17 16:01, robert rottermann wrote:
> Hi there
> 
> I have a server running with an uptime of some 5 years..
> 
> root at susanne /var/log # uptime
>   21:49:54 up 1939 days, 21:50,  1 user,  load average: 1.84, 2.04, 1.83
> 
> Its root partition has filled up to nearly 100%
> 
> root at susanne /var/log # df / -h
> Filesystem      Size  Used Avail Use% Mounted on
> /dev/md2         20G   18G  1.1G  95% /
> 
> now my questions are:
> 
> 1. what folders are in the root partition
> 
> 2. What folder/files can I delete without killing anything?
>      Like /tmp ...
> 
> 3. how can I find out what folder in
> 
> thanks for your help
> 
> robert
> 
> 
> 




More information about the ubuntu-users mailing list