Hi all. I am in the process of upgrading all my systems to 20.04. Some days ago I noticed that in one system the 22 GB allocated to / where nearly full. I then performed the usual tasks:
1. Removed old kernels (only one was around).
2. Purged the package cache with apt.
3. Removed all orphaned packages found with gtkorphan.
4. Uninstalled about a dozen applications used less frequently.
5. Removed older versions of Snap applications.
6. Cleared systemd journal logs.
All this freed about 2 GB, which is still insufficient to upgrade to 20.04. A fresh Ubuntu installation should not take more the 5 GB, and while I have various programmes installed, I am at a loss to explain how it can take up so much space.
The problem is that there is no obvious culprit. Listing the packages larger than 100 MB, I can see TexLive is taking some space, but far from justifying 20 GB:
Code:
dpkg-query -W -f='${Installed-Size;8} ${Package}\n' | sort -n
[...]
105934 texlive-fonts-extra-doc
106874 docker-ce
115945 libboost1.65-dev
125423 inkscape
132095 libreoffice-core
165607 linux-modules-extra-4.15.0-91-generic
165744 linux-modules-extra-4.15.0-108-generic
165765 linux-modules-extra-4.15.0-109-generic
178737 docker-ce-cli
206344 firefox
214194 chromium-browser
232263 libgl1-mesa-dri
232770 skypeforlinux
324978 linux-firmware
909313 texlive-fonts-extra
Also ranking system folders nothing obvious comes up:
Code:
$ sudo du -h --max-depth=0 bd bin boot cdrom data dev etc lib lib32 lib64 lost+found opt proc root sbin snap srv sys tmp usr var | sort -n -r
206M boot
188K tmp
66M root
20M etc
16K lost+found
13M sbin
13M bin
12K dev
11G usr
8,0K data
5,8M lib32
4,0K srv
4,0K lib64
4,0K cdrom
4,0K bd
4,0G snap
3,3G var
3,1G opt
1,1G lib
0 sys
0 proc
$ sudo du -h --max-depth=1 /usr | sort -n -r
809M /usr/bin
684K /usr/games
404M /usr/src
240M /usr/include
91M /usr/libexec
20M /usr/sbin
11G /usr
8,0M /usr/lib32
4,2G /usr/lib
4,1G /usr/share
1,1G /usr/local
I would welcome creative ideas to further reduce space that do not involve randomly uninstalling software.
Thank you.
Bookmarks