"*How exactly is this done (e.g. does it basically just comment out those lines in /etc/apt/sources.list and the .list files in /etc/apt/sources.list.d/)? *"
Yes, that's exactly how it's done by the do-release-upgrade Python script.
"I am also aware that recently the release upgrade process has a new option to allow for keeping third-party/PPA repositories enabled."
It's not quite recent (that link is from 2019). The feature is for testing, so PPA authors can discover these little conflicts and errors so they can fix them. It merely prevents the non-Ubuntu (PPA, third party) sources from being disabled. It makes no other changes to the release-upgrade calculations. Using might (or might not) break your upgrade.
"I would like to understand the nature of the problem and learn how to deal with it head-on"
The problem is most commonly version conflicts. Let's offer an example of how it works:
- Your Ubuntu 20.04 includes a (example) package
libfoo 1.1
. You have several applications that depend upon it.
- During the 20.04 cycle, you installed the Frobozz PPA that provides --among other packages--
libfoo 1.3
.
- Finally, you want to release-upgrade to Ubuntu 22.04, which includes
libfoo 1.2
.
During the release-upgrade, unbeknownst to you, updated package baz
now specifies that it needs exactly libfoo 1.2
, usually not a problem since the entire release is built assuming that version. However, since libfoo 1.3
is already installed, the baz
install fails along with all packages that have baz
as a dependency.
The "head-on" solution is to uninstall the conflicting 20.04 packages from the Frobozz PPA (including libfoo 1.3
) and return your system to stock Ubuntu (libfoo 1.2
). Then you can install compatible 22.04 packages when the PPA author gets round to building them. Or you can install 22.04-compatible packages from elsewhere. Recall that uninstalling an application package does NOT delete any of the data in your /home
directory.
- Building the release around a single, uniform set of dependency versions has been a fundamental element of Debian system design for over 25 years. Don't fight it. They are not going to change it, so go with the flow.