AFAIK the packages in Debian/Ubuntu world should only be removed on major OS release (Debian 9 -> 10, Ubuntu 22.04 -> 22.10, etc).
I think that if you upgrade the OS by just changing repo URLs in apt config, the old packages will stay installed - so it will be just like in Arch situation described by the author.
For Ubuntu, their do-release-upgrade script asks you to remove packages that didn't make it to next release. https://askubuntu.com/questions/1392819/do-release-upgrade-h...
EDIT: you can find obsolete packages on your system using apt or aptitude https://askubuntu.com/questions/98223/how-do-i-get-a-list-of...