So, what to do if you had accidentally upgraded to Ubuntu 24.04 and found that you actively dislike it ?
I made a script to upgrade it to Debian 13 Trixie which is now in Testing stage.
The script can be had from github.com/muwlgr/scripts/raw/main/upgrade-noble-to-trixie.sh .
(please read muwlgr.dreamwidth.org/53146.html for up-to-date upgrade script)
I tested it on Ubuntu, KUbuntu and Ubuntu Server 24.04, with BIOS and UEFI boot loader, under QEMU/KVM virtual machine.
Also used it to upgrade KUbuntu Noble on my Lenovo IdeaPad 5.
As Ubuntu development is following Debian Unstable (Sid), they often incorporate packages into their LTS releases which are newer than those in Debian Stable and even than in Testing.
So to transform recently-released Ubuntu LTS into as recent Debian Testing, some packages will have to be downgraded.
Their downgrade order is not obvious (not easily resolved by apt/dpkg facilities), and may break your system if followed improperly.
I found an adequate order by trial and errors on a virtual machine with easily-revertable qcow2 image snapshots.
Commmon approaches implemented in my script are the following:
- Disable Noble APT sources. Configure Trixie sources and update APT package lists
- For every installed package, query its versions with apt-cache showpkg and find version provided by Trixie package list, forming a list of explicit pairs package=version for apt installation.
- Initially, upgrade apt and dpkg using these explicit versions. I also upgrade eatmydata in this step, if required.
- Then upgrade/downgrade most other packages, except libc6 and base-files.
Debian packages will be compatible with lower version of libc6. - Some Ubuntu libraries have migrated to t64 (64-bit time_t), while their Trixie counterparts have not.
Need to find such pairs and install Trixie's non-t64 libs. - Then downgrade libc6 (libc6*, libc-*, locales)
- Then upgrade/downgrade base-files.
I found that even unpacking Debian's base-files when Ubuntu's libc6 is still installed instantly breaks all dynamically-linked executables installed on the host.
That is, I became unable to run any of them and had to terminate my VM and to revert my qcow2 snapshot. - Then refer again to the original package list taken from Noble and try to reinstall all its packages which could have been removed explicitly or implicitly
Some more upgrade notes:
- On gdm3 installation, Debian checks and/or creates user account and group called 'Debian-gdm'.
Ubuntu creates the same with name 'gdm', also with the same home folder /var/lib/gdm3 owned by gdm.
So before upgrading Ubuntu's gdm3 to Debian's one I explicitly/manually create Debian-gdm user and group with the same numeric IDs as existing Ubuntu's gdm, to avoid permission conflicts. - shim-signed is provided as a single package in Ubuntu but split into several packages in Debian.
Its upgrade I made into a separate step with apt restart on unpacking/overwriting failure. - Debian Trixie does not provide sssd* packages right now.
They exist in Bookworm and Sid but not in Trixie
So your Active Directory integration will fall off during the upgrade.
Hope this will be resolved before Trixie getting released as Stable.
Similar absence was noticed for other smaller packages, like dmraid. - ubuntu-session package is not provided by Debian, have to explicitly install gnome-session.
- Unlike Ubuntu all-in-one linux-firmware package, Debian has multiple firmware packages split by different hardware vendors and types.
In my script I try to install these packages for most popular hardware types found on the host. - Noble's kernel is newer than Trixie's (6.8 vs 6.7).
With some setups I could not get into GRUB menu to choose Trixie's kernel before next boot, so I added logic to remove running/active Noble's kernel before the reboot.
Be sure to respond "no" to the query "Abort kernel removal?" - Noble installs AppArmor v4, while Trixie is still at v3 wth incompatible config syntax.
So, need to purge Noble's AppArmor together with its config files before downgrading it to v3.
As well, some Ubuntu packages install their own AppArmor profiles as conffiles, which are not downgraded by Debian packages.
The script now backs up conffiles of such packages and purges them before reinstallation, but from my observation, Trixie's profiles for cups, rsyslogd and man-db are screwed in their own way.
You will notice long [re]starts of these services with corresponding records in dmesg and journalctl. - Some Debian package pulls in gnome-user-share which pulls in apache2-bin , and some other package pulls in exim4-daemon-light. I checked that Ubuntu did not install gnome-user-share at all
In a separate step I remove these packages, provided they were absent in the initial Ubuntu dpkg -l printout.
Similar logic I added for lynx, mailcap, tk8.6, opensc and pcscd
Other notes are mostly the same as in my previous posts like muwlgr.dreamwidth.org/52430.html : watch what has changed, check what is missing.
Run aptitude search '~o' to find what packages on your system are still from Ubuntu (that is, from now-unlisted sources)
If you use a laptop or other less popular or more diverse hardware than just Intel/Realtek/NVidia, look into your dmesg for missing firmware files and find on the Internet where to get them (either from Debian packages, or from 3rd party sources).