1

I removed lot of packages over the time from system using apt remove instead of apt purge. Once I removed a package using apt remove and cleaned my system using bleachbit. After somedays I ran the apt purge command to remove files that were left by old package which was removed week ago. So, my question is that, how can I use apt purge to get rid of all the files of packages that I ever removed using apt remove?

1

As of 12.04 you can just do

sudo apt-get remove --purge {packagename}

for packages that already have been removed.

This will do them all in 1 nifty command ...

dpkg --purge `dpkg --get-selections | grep deinstall | cut -f1`

Old skool:

If you want to do this visually: install Synaptic Install Synaptic from the Software Center and run synaptic. You ca find what you want to remove in the "Not Installed (residual config)" section.

  • 1
    That nifty command works perfectly :) – Karanvir Singh Aug 30 '16 at 15:14

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.