How to get removed a broken package (in this case "click")?

After that was not successful, I have tested this "the hard way" ... and ... it works!

sudo rm /usr/bin/click
sudo apt-get autoremove -f click

The file has a problem when importing a Python module and you want to remove the package anyway. Therefore the file can be removed manually.


i've had same error with broken packages click and click-apparmor, url-dispatcher after upgrading 14.04 -> 14.10 -> 15.04

*updated:

the solution for me was removing package folder rm -rv /usr/local/lib/python3.4/dist-packages/click and then:

sudo apt-get update && sudo apt-get install -f

solution source


sudo apt-get remove click
sudo pip3 uninstall click
sudo pip uninstall click
sudo apt-get install click -f

The problem is that many upgrade users will have a version of click installed with a version number under their pip or pip3 repository, these aren't managed by apt, and they take priority when Python's import keyword is invoked.

So, you need to uninstall them before reinstalling click is going to do you any good. The reasons they might be installed is that it can happen during setup of a third-party python app, and God knows I've done a few.

Tags:

Apt

Uninstall