Before an Ubuntu release upgrade I always wonder what happens to the extra repositories I added over the years. The upgrader has a documented answer, and a switch to change it.
sudo do-release-upgrade --allow-third-party
The man page describes the option as trying the upgrade with third-party mirrors and repositories enabled, instead of commenting them out. That tells you the default: without the option, third-party entries are commented out during the upgrade. It’s a safety measure, because a repository built for the old release can pull packages that don’t fit the new one.
Related options from the same man page that I’d know about:
-cor--check-dist-upgrade-onlyonly checks whether a new release is available and reports it through the exit code.-m serveror-m desktoppicks the upgrade mode. The page givesdesktopfor regular upgrades of a desktop system andserverfor server systems.-dor--devel-releaseupgrades to the development release when you are on the latest supported one.-e VAR=VALUE,...sets environment variables for the duration of the upgrade.
A cautious order would be to run the plain upgrade first. Afterwards, look at your sources, re-enable the repositories you still need and check that the vendor supports the new release. Use --allow-third-party when you know a repository already supports the target release and you don’t want to redo the work by hand.
Caveat: the man page doesn’t say how each kind of repository is handled, or what happens when a third-party package conflicts with the new release. Keep a backup before any release upgrade, and treat this switch as a way to take on more risk. This was written from the man page and was not run, because it needs a real release upgrade.
Further reading: do-release-upgrade(8), Ubuntu man page