root partition full, what files / folders can I delete

Colin Law clanlaw at gmail.com
Thu Feb 17 21:12:49 UTC 2022


On Thu, 17 Feb 2022 at 21:03, robert rottermann <robert at redcor.ch> 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

Everything that isn't in other partitions.  That may sound flippant
but actually it isn't.  It is impossible to know what is in that
partition without knowing whether, for example, you have a separate
/home partition.

>
> 2. What folder/files can I delete without killing anything?

Don't do this yet

>      Like /tmp ...
>
> 3. how can I find out what folder in

Start by doing
sudo apt autoremove
sudo apt clean

which may well free up a good chunk.  Then install ncdu. Then run
sudo ncdu /
and it will tell you how much space is used where.  You can step down
the tree to find where the large usage is.

Colin




More information about the ubuntu-users mailing list