This question already has an answer here:
I think I may have botched my system. I have recently installed Ubuntu 14.04 on my computer.
One of the first things I did was install python 3.3 from source (using
make altinstall); but then I realized that python 3.4 is already native in Ubuntu 14.04 and decided to remove the python 3.3 installation. To do that, I followed the instructions on this post.
Unfortunately, only too late did I realize that this resulted in the creation a .deb file containing a package named "python", which was subsequently installed. This had the effect of completely mangling my package system. Any attempt to use apt-get produces many dependency errors like the one below:
mercurial : Depends: python (>= 2.7) but it is not going to be installed Depends: python (< 2.8) but it is not going to be installed
I tried to remove the custom package by running
dpkg -r python_3.3.5-1_amd64.deb but it says that I need to remove by the name of the package, not the name of the file. And running
dpkg -r python also fails:
dpkg: dependency problems prevent removal of python: python-ubuntu-sso-client depends on python (>= 2.7). python-ubuntu-sso-client depends on python (<< 2.8). ...
The first solution I came up with was to completely re-install Ubuntu, but before I go ahead with that drastic solution, is there any way I can undo the effects of installing this custom "python" package?
Can I somehow use the .deb file to remove the package from the system (e.g. by removing the file sit provides and then resolving the dependencies by hand)? Or did this "python"-named package mess up the packages beyond hope of recovery?