How did I fix «error processing archive /var/cache/apt/archives/python3-numpy_1%3a1.24.2-1_amd64.deb (--unpack): trying to overwrite '/usr/bin/f2py', which is also in package python-numpy 1:1.16.2-1» on `apt --fix-broken install`?

2023-10-17--06-00-56

The solution

dpkg --purge python-numpy <other packages who uses python-numpy>

In my case:

dpkg --purge python-numpy python-matplotlib
dpkg --purge python3-matplotlib
dpkg --purge python3-ufolib2 python3-fonttools
dpkg --purge python3-scipy
dpkg --purge python3-pythran

unix.stackexchange.com/a/759144