My Ubuntu installation has a root of 16 Gb. But it keeps on complaining it runs out of space. I have looked at the installed software and found LibreOffice. I performed a remove and purge of LibreOffice. But a few days later (as in today) it complained again it runs out of space.
I checked the used space again, and found out LibreOffice is still installed.
Am I correct, LibreOffice got installed again? And what can I do to permanently remove LibreOffice?
I have moved your post to the help category (project discussion is not really for support questions)
Why are you looking at the /lib folder ? This is very unlikely to be the one where your space gets actually eaten up, the contents in there are rather static and do not change at runtime, move a level up and check which folder of your / takes up most space, then move into that one to get a more detailed view.
You see that LibreOffice takes relatively little space, and will not be the main issue why your root is running full.
If you remove a program, it will not automatically be installed again. My guess is that you removed a version installed as a snap, and that a version installed as an APT package (.deb) is still on the system. So remove it using the Ubuntu Store, or the “apt remove” command.
There are many, many possibilites about what might be eating storage space. Depends upon your usage.
Check first: One common system storage eater is a runaway log file or journal file. This is worth checking early, as the space problem is a mere symptom. Fixing the actual underlying problem is essential.
Here, you can see that logfiles should be only a few KB or MB. If yours are consuming GB, that indicates a system problem that needs to be fixed.
$ ls -lah /var/log/syslog*
-rw-r----- 1 syslog adm 135K Jun 1 08:15 /var/log/syslog
-rw-r----- 1 syslog adm 9.6M Jun 1 00:15 /var/log/syslog.1
-rw-r----- 1 syslog adm 1.4M May 25 06:28 /var/log/syslog.2.gz
-rw-r----- 1 syslog adm 608K May 18 17:39 /var/log/syslog.3.gz
-rw-r----- 1 syslog adm 1.1M May 12 07:49 /var/log/syslog.4.gz
If you do have a runaway log file, stop here. Read a segment of the log and fix the problem.
Check second: Even if there is no problem, your journal might have grown.
Here you can see one method of checking and controlling your journal file…
$ journalctl --disk-usage
Archived and active journals take up 2G in the file system.
$ sudo journalctl --vacuum-time=2d
[sudo] password for user:
Vacuuming done, freed 1.9G of archived journals from /var/log/journal/4d6630d374204c21b1c9214bbaedff4b.
$ journalctl --disk-usage
Archived and active journals take up 72M in the file system.
Check third: Common storage-eaters in your /home might include movies, browser downloads, and email attachments. Those can really add up over time quietly. Many users can get the fastest benefit by weeding these. The tool you are already using, Disk Usage Analyzer, is a great help.
Software packages rarely consume enough space to be noticeable. Removing them is easy enough, but it’s rarely an effective solution.
Your 16GB is not particularly large for a full install of Ubuntu. Does that include /home?
I have seen users with snaps alone taking 20GB in /(root). I use Kubuntu which is not quite as large and it uses 12Gb with no snaps installed and all my data in separate partitions. And often after I install a few more apps, I get close to 20GB.
Post this: lsblk -f
We don’t know your current disk partitioning. You may be able to simply enlarge the root partition (or root logical volume, if LVM is used), and I would agree that 16 gB is too small nowadays, especially if you use snaps and/or flatpaks. You should plan for an extra 6-8 GB when initially allocating space if you use them.
Ubuntu has some great built in tools to help you see what’s using up disk space one that comes to mind is Disk analyzer, once you run it, it will allow you to click on things like the Home folder and give you a read out on what’s using up space on your machine
There are obviously commands you can run that will do the same
Command: du Find out which directories take up the most space
16GB is definitely not enough for a usable system where you will have some software installed beyond the basic OS.
I’m curious what made you make that weird relation to your RAM ? The rootfs has definitely nothing to do with RAM at all, did any tutorial make such a suggestion (perhaps they typoed “swap” space for “rootfs”) ?
It is also not really clear what you want to achieve with putting /tmp on a separate partition, this seems like a rather pointless thing and just wastes space…
Given you have a rather comfortable 1.5TB disk there I’d consider rethinking your partitioning scheme and at least resize your root partition to something like 256GB so that you can actually install some applications and have some room for application data, caches and the like.
If you keep it like it is now you will constantly have to fix issues …