Q:

resolve broken apt-get package download

I got an issue with the leap-keymanager package.
sudo apt-get purge leap-keymanager 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: The package python-leap-common needs to be reinstalled, but I can't find an archive for it.

Which is preventing me from doing a dist upgrade.
sudo apt-get dist-upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: The package python-leap-common needs to be reinstalled, but I can't find an archive for it.

How can I fix this? I've add the leapcode PPA and done sudo apt-get update but I still get the same message.
python --version Python 2.7.9
Distributor ID: Ubuntu
Description:    Ubuntu 15.04
Release:        15.04
Codename:       vivid

A:

Remove python-leap-common 
sudo apt-get remove python-leap-common

The important part about removing python-leap-common from /var/lib/dpkg/status is to remove the whole block of information about it. Refer here ... 

