4. Return your deb sources and packages to stock condition
Disable all non-Ubuntu (unoficial) deb sources, including disabling PPAs. Uninstall the deb packages that those sources provided. Return your deb packages to as close to stock condition as possible.
Keep deb packages that came from the official Ubuntu repositores. Those are supported.
Keep non-deb software, like Snaps, Brews, Flatpaks, Wheels, etc. We can’t guarantee that they will work under 26.04, but they won’t break the release-upgrade.
Whilst the above is a great recommendation, I am left hanging as to how to achieve it. To help others, here’s what I got so far. There may be better ways to achieve this.
- Disabling non-ubuntu sources.
I think you can officially find your sources in /etc/apt/sources.list.d/ folder and /etc/apt/sources.list file. But GUI package managers should also offer an easy way to disable sources. In Kubuntu/KDE’s Discover it looks like this:
I think that anything under “Ubuntu XX.XX” that’s not named “Ubuntu Questing …” should be disabled
- Listing all manually installed non-ubuntu packages
You can very easily list all the packages marked as “manually installed” using apt-mark showmanual. This is a good list to keep in mind and save to a file. If you have to re-install everything, it’ll make your life much easier.
However, right now we only care about those that come from a “third party source”. I had a coding agent produce the following bash script which looks at the result of apt-cache policy <pkg>:
apt-mark showmanual | while read -r pkg; do
if apt-cache policy "$pkg" | grep -Eq '^[[:space:]]+[0-9]+ http(s)?://([^ ]*ubuntu\.com|[^ ]*canonical\.com)/'; then
:
else
echo "$pkg"
fi
done
At a quick glance, the result look good enough for me. (lists only apps I did install from custom sources)
Save that list to a file so you can easily add them back later.
- You can now uninstall all those packages with
sudo apt remove <pkg> - Those packages had dependencies, that are likely also no longer needed, and we don’t want them to be in the way of the system upgrade. So
sudo apt autoremoveto clean that up.
Additional note: As for non-debs, I don’t use Brews, Snaps, Wheels, or whatever. Only flatpaks, which are all user-installed (not system-installed) and my Home partition is on its own drive. Which makes it quite easy to keep my apps across Distros.
—
Please let me know if I got anything wrong! Official recommendations would be welcome here !
Also not that as of writing this, my release window isn’t open yet (you can check if a new release is available without committing to it with do-release-upgrade -c). So I have not actually gone through the disable/uninstall steps myself as of yet.
