aliquote.org

Ubuntu 24.04

August 15, 2024

I just installed and configured Ubuntu 24.04 LTS. This is the second dist upgrade I apply on the same laptop. Everything went well but this time I wanted to polish things a bit, especially remove old artifcats from multiple upgrade while keeping all my customizations. By the way, the extensions I were using (Tactile and Simply Workspaces are now useless with the new features introduced in Gnome desktop).

I won’t comment about the new Desktop, WM or app UI, there’s already a good deal of information on the web. It’s pretty slick as far as I can tell (e.g., Nautilus or the desktop menu bar). However, I should note that Ubuntu mono font now looks quite crappy in a Terminal. Since I downloaded the Nerd font equivalent a while ago, I switched to that temporarily (I know nostalgics can get the “legacy” font from a package). What follows is is merely an installation log.

After updating all packages installed on my laptop, I ran the classical do-upgrade-release -d at the shell prompt. This didn’t work. First, there appeared to be some problem with custom PPAs. I started to remove them one by one then forgot a leading asterisk which removed them altogether. A good start to say the least… Afterwards, there still was a pending issue with postgresql-12 (which may date from the 20.04 release?). Finally, the dist upgrade went fine, although some packages like texlive highlighted minor errors while some other packages were forcibly removed.

Upon rebooting the system, my plan was to remove packages tagged jammy (obs-studio), remove packages installed from custom PPA, check orphaned packages if any and record packages with residual config files for further investigation. It took me a few more minutes.

I deleted old Linux kernels (headers and images), totalling 640 Mo on my HD! I used a shell script slighty adpated from SO.

» dpkg --list | grep linux-headers
ii  linux-headers-5.15.0-118                       5.15.0-118.128
ii  linux-headers-5.15.0-118-generic               5.15.0-118.128
ii  linux-headers-5.19.0-50-generic                5.19.0-50.50
ii  linux-headers-6.5.0-45-generic                 6.5.0-45.45\~22.04.1
ii  linux-headers-6.8.0-40                         6.8.0-40.40
ii  linux-headers-6.8.0-40-generic                 6.8.0-40.40
ii  linux-headers-generic                          6.8.0-40.40
ii  linux-headers-generic-hwe-22.04                6.8.0-40.40\~22.04.3

Next, I wanted to get ride of resiudal config files from uninstalled packages. For whatever reason (e.g., packages flagged as manually installed), even all packages were supposed to be “purged” and “autoremoved” from the system, there remained dozens of such files.

I listed all relevant packages as follows:

dpkg --get-selections | grep 'deinstall$' | cut -f1

I then tried to pipe this list to xargs sudo apt --yes purge but I got stuck in the middle of a dialog box asking whether I really wanted to delete everything from Postgresql 12. Shortly after C-c’ing and killing the whole process, dpkg was no longer working. I reconfigured dpkg and then all packages were flagged as purge and not deinstall this time. I finally was able to cleanup everythign and checked that I got the same number of installed packages as highlighted by neofetch:

sudo dpkg --configure -a
dpkg --get-selections | grep 'purge$' | cut -f1
sudo apt clean && sudo apt autoclean && sudo apt autoremove
dpkg --get-selections | wc -l

I also cleaned up /usr/share/applications and $HOME/.local/share/applications for unused desktop entries, my /opt directory full of application for testing purposes, and a bunch of unused software.

I still need to filter out broken executables installed by Python in $HOME/.local/bin (e.g., streamlink), install nodejs, npm and yarn, and handle software that were installed via custom PPAs (e.g., Racket). Also, I would need to review log files in /var/log/dist-upgrade to see if I missed something.

» neofetch
OS: Ubuntu 24.04 LTS x86_64
Host: Latitude 7310
Kernel: 6.8.0-40-generic
Packages: 3623 (dpkg), 17 (flatpak)
Shell: zsh 5.9
Terminal: alacritty
CPU: Intel i7-10610U (8) @ 4.900GHz

Sidenote

[2024-08-17]
As advised on Linux Mint Forums, you can just install the latest available deb package (23.10 Mantic), and it works right out of the box.

Oh, I forgot to say that Minecraft is still working ;-)

♪ Tindersticks • See my Girls

See Also

» How I manage my startup shell scripts » Foot terminal for Wayland » Why I like Ubuntu, eventually » Mono color scheme for tty » Alacritty