There is an intriguing simple command as you can now keep PPAs and Third Party Repositories enabled when upgrading to a newer Ubuntu version:
RELEASE_UPGRADER_ALLOW_THIRD_PARTY=1 do-release-upgrade -d
The RELEASE_UPGRADER_ALLOW_THIRD_PARTY environment variable can be used with both the command line and the GUI upgrade tools. So when you want to upgrade your Ubuntu system and keep PPA and third party repositories enabled, run the upgrade from a terminal, like mentioned above for the command version. I guess BEFORE the actual system upgrading. For the GUI version:
RELEASE_UPGRADER_ALLOW_THIRD_PARTY=1 update-manager -d
(-d is used to allow upgrading to development releases - for example to upgrade from Ubuntu 18.10 to 19.04 right now, while Ubuntu 19.04 Disco Dingo is still in development)
It's worth noting that you may still see a warning about third party sources being disabled on upgrade, but those that support the Ubuntu version to which you're upgrading will not be disabled.
A regular Ubuntu release upgrade (to a newer Ubuntu version) disables any PPA or third party repository that may be enabled.
Some recent changes to ubuntu-release-upgrader allow keeping PPA and third party repositories enabled when upgrading to a newer Ubuntu release, while also providing better support for cases in which the users have their own mirror of the archive. This is done by using an environment variable, RELEASE_UPGRADER_ALLOW_THIRD_PARTY.
Source: Linux Uprising Blog and Brian’s Blog
I only found this solution after the upgrade and run the command anyway, it added a new entry for each PPA with the new Ubuntu version's name in it. I then just had to delete the old ones.