I agree, this is great. How does Debian do it?

One thing I liked about Ubuntu was how they handled the Python 2 -> Python 3 transition after version 2 was officially no longer supported.

`python` was then a non-existent command which would fail while python3 continued to work.

This way one would not accidentally run a Python 2 script which kind of worked with Python 3 but then failed under very specific circumstances, possibly even after running for a couple of days. Not even letting that script start in the first place directly after the distro upgrade was the correct thing to do.

There's a pretty popular `python-is-python3` package in Ubuntu which aliases `python` to `python3`. I used to install that in my dev environment setup scripts, but have since stopped using it for the reasons you mentioned. I've found it best to think of Python 2 and 3 as totally separate languages, so I consider it a good thing that the binary name python3 is unambiguous in all contexts.

It makes more sense to support that as an opt-in rather than making the default, I would think

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...

> How does Debian do it?

Debian guarantees than no package is removed from a release during its entire lifetime. This is why it's called Stable.

This can be extended to 5 years if you use LTS and up to 10 years if you use ELTS (but it's an external commercial service)

Then you are stuck with tutorials / instructions looking for python instead of python 3 until you just alias python 3 back to python.