Hi all.
Got a message of being low on storage. Checked the pop-up message; attached below.
Is there something to get rid-of safely ? I run a very slim Ubuntu 24.04
Are previous updates getting rid of old/obsolete useless versions or still occupy space ? Please guide me as for a beginner unskilled user.
I emptied the ‘garbage’ and message persists. See too much ‘snaps’ that I do not even know what they are, and too many ‘lib’ which I do not know what are those for.
Snaps are the applications in snap format you installed, if you click on the label “snapd” you can see the space used by each snap app. Then click on the label “var” and check if you have much space occupied by “log”
In any case if you install many applications in snap format 27GB are few for Ubuntu 24.04.
You have a very large /var folder in your file system, 16GB, whereas mine is just 2.4GB so I suggest you see if you can find the reason for this.
It will probably be one or more runaway log files in /var/log so look to see if there is one or more large log files in there and then we can explore what is the reason for this.
Snap applications can use more space than .deb versions of the same applications but that does not seem to be your problem.
However, I do agree with corradoventu that your 27GB is probably insufficient for successfully running Ubuntu as a main OS; it might run at the start but will very quickly fill with your data files which currently use just 5GB.
/var is the place where the system stores changing data files (as opposed to static system data files which live in /usr/share/). These are made up of system wide application data files e.g. database server tables, caches, and logs. snap packages are also store in /var.
snap packages keep two old revisions on disk so you can roll back in case an updated version doesn’t work. You can tell it to keep only one backup by entering ‘snap set system refresh.retain=2’ (the ‘2’ means: keep the current version and one before it). After telling it to keep only one revision, you might have to remove the old revisions by using ‘snap list --all’ to see all the snaps and then use ‘snap remove --revision ’ e.g. ‘snap remove --revision 1533 gtk-common-themes’.
apt does keep a cache of downloaded packages in ‘/var/cache/apt/archives/’. ‘sudo apt clean’ removes all files from that cache. Unless you’re in the habit of uninstalling and reinstalling the same packages, removing these should be mostly harmless.
Which leaves the logs. Large logfiles are a sign that something is going wrong. The largest usually is /var/log/syslog and /var/log/syslog.1. If these are bigger than 5 Megabyte something is probably wrong. I say probably because the size of a log depends heavily on your use of the system. A heavily used system produces bigger logs than one which only runs for an hour or two on every other day. Just deleting logs doesn’t make your problems go away. Taking a look at their content might at least tell you what is producing a lot of entries and why. They are simple text files.
Another thing is the journal. This is the primary logging system, the text logs are mostly a backup (the journal is stored in a binary format that’s hard to read without the right tools; reading the logs of a crashed system is usually the way you find out what went wrong, so that’s the reason to keep the text logs in addition to the binary journal). The journal is stored in files under /var/log/journal/ but directly manipulating them is a really bad idea. The interface to the journal is the journalctl command. It’s not only used for viewing the journal, you can also use it to shrink the journal by using the --vacuum-… options possibly together with the --rotate option e.g. ‘sudo journalctl --rotate --vacuum-size=1G’ would close the existing journal files, create new ones and throw out old entries until the size is 1 gigabyte. You also change the behaviour of the journal system by changing the configuration in /etc/systemd/journald.conf. There is a manual page for this file and the options you can put in there.
Thanks for your effort, gentlemen. Am totally unskilled to follow your expertise.
Can guess some terminal commands suggested in your responses but will be not understanding what am doing.
Checking the SSD 32GB drive, there is a 1MB partition1, a partition2 shows FAT32??? with 8 MB used; and the attached image for partition3.
If you have the patience; tell me in words for an idiot, what to do to clarify. Usually can operate the terminal fine to obey your instructions, but my lucidity is fading fast.
I changed your title because “Anything scary here?” is way too generic of a title. I have made it a little more specific to the low storage space issue.
I noticed that you have about 32GB of storage, I wouldn’t recommend that much of storage myself, because when I have things to do, such as doing business or making games/movies , I would recommend 1TB of storage or larger “SSD is recommended but HDD is fine”.
Here’s a hard drive that I found it for you and if you don’t want to buy it, that’s okay because I’m not making you have to do it. However, if that drive is too expensive to you, you can find a cheaper one if you want, your device it’s part of your property, you can do what you want with it.
If that didn’t solved issues for you, that’s too bad.
Unfortunately, Ubuntu requires 25GB as a minimum and probably 32GB or larger would be recommended “Which I can’t help you with that”, but it may explain why Ubuntu provides two sets of installation.
Example: Minimal Installation and Expanded Installation.
When performing the command you suggest; I get three ‘done’ with no explanation of what happened or if succeeded in liberating space. How to find the difference to the previous “low on storage” condition ?
If you have sufficient RAM and does not run too much apps together you may remove the swap.img. what does the free command say?
Try also apt autoremove --purge
Check also the space used by your snap apps: sudo lsblk -o NAME,LABEL,SIZE,FSTYPE,MOUNTPOINT
In my ignorance; am convinced there is 90% of useless contents in the drive that do not get purged. I run an extremely lean machine with very few applications I hardly use and open 3 or 4 maximum tabs in a session.
How to delete what to see if that liberates space? I can buy a bigger drive/storage if really needed after trying to get rid of the bloaters.
Do I proceed with " Try also apt autoremove --purge " or not yet ?
As has been suggested above, your /var/log directory is 16GB. You need to delete (using sudo) the various log file to free up space. Use du -h /var/log to get the size of the various log files .