Ubuntu – Cancel installing pending package with apt-get

aptpackage-managementsoftware installation

Yesterday I trying to install a package with apt-get but I regret of installing this package, but every time I want to install a new package the apt-get trying to install that package again !

How I can cancel hold packages in apt-get ?

Best Answer

You may not have removed the package correctly, or apt-get got interrupted while removing the package. First, I would suggest running the following to process pending operations:

apt-get -f install

Once this is done, use autoremove to make sure there is no garbage in the way:

apt-get autoremove

Then, remove your package completely:

apt-get remove --purge [package name]