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

Solution 1:

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.

Solution 2:

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

Solution 3:

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.

Solution 4:

Install click again to install the dependencies.

sudo apt-get install --reinstall click

Then remove it with this command.

sudo apt-get autoremove -f click

If that does not work, then install python and/or python3:

sudo apt-get install --reinstall python
sudo apt-get install --reinstall python3
sudo apt-get install --reinstall python3-click

and than again

sudo apt-get autoremove -f click