Debian: Purging an Already-Removed Package

Debian’s excellent package manager, apt, can remove a package two different ways. It can merely delete the binaries, leaving behind config files, or it can purge the package, removing all traces of it. Sensibly, the former is the default.

Every once in a while, you’ll accidentally invoke "apt-get remove foo" instead of "apt-get remove --purge foo". One way to fix this is to reinstall the package, and then re-remove it with the purge option. There is, however, a better way. To purge an already-removed package, do:


     dpkg --purge foo

1 Response to “Debian: Purging an Already-Removed Package”


  1. 1 he1ix

    doesn’t work anymore, dpkg complains:

    dpkg - warning: ignoring request to remove foo which isn’t installed.

Leave a Reply




Creative Commons Attribution-NonCommercial 3.0 United States
Creative Commons Attribution-NonCommercial 3.0 United States