root partition full, what files / folders can I delete

ubuntu at howorth.org.uk ubuntu at howorth.org.uk
Thu Feb 17 21:17:31 UTC 2022


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

Well ls / shows what directories are there
df -h shows which of those directories are separate filesystems
and the difference between the two is the list of directories you're
interested in. (i.e. those that are NOT separate filesystems)

Another useful command is du -sh /* and that will show you how much
space each one takes (run as root to avoid permission errors)

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

you can't delete the /tmp diretory itself but you can delete its
contents. Look through the list to find big directories then list them
with ls -lh <dirname> to find big files within them and delete whatever
large files you think you can do without.

If /home is part of the / filesystem then there can be lots of big
useless files (old videos etc) in places like .mozilla or suchlike

> 3. how can I find out what folder in
> 
> thanks for your help
> 
> robert
> 
> 
> 
> -- 
> ubuntu-users mailing list
> ubuntu-users at lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/ubuntu-users




More information about the ubuntu-users mailing list