2

I uninstalled tons of package with apt and always used remove.

Knowing I won't ever use them, and I worry about polluting my system with old config files, how can I purge all of them? The apt purge <package-name> command requires me to know what I want to purge, and I don't remember everything.

1

1 Answer 1

5

Simple way to do it is

dpkg -l | grep ^rc

This lists all (semi)installed packages, lines in list starts with state, rc means that the desired state is "remove" and the status is "conf-files".

If you want only package names:

dpkg -l | awk '/^rc/ {print $2}'
1
  • thank you ! It's a shame apt doesn't have an option for that
    – sayanel
    Commented Jan 21, 2021 at 9:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .