In Synaptic Manager I noticed I had a lot of packages in that list, and was wondering if any shouldn't be removed for some reason? Or if that is all safe to be removed. Is it possible that some should be kept, or does that show useless packages that should be cleared?

I have ran sudo apt-get autoremove but they are still there. (Also clean & autoclean)

What it is...

  • FYI—these configuration files do not take up a lot of space. I just purged 342 packages with residual config files (mostly old kernels) and the grand total of reclaimed disk space: 2.6 MiB.
    – hackel
    Sep 20, 2016 at 16:23
  • 1
    @hackel Linux kernel residual config takes up lots of space
    – endolith
    Jan 12, 2017 at 5:25
  • 1
    @hackel FWIW I just had an outage exactly because these configuration files took enough space to fill root
    – galets
    Jan 24, 2021 at 5:36

2 Answers 2


As this question merged to here, there is need to provide some information which may helpful

From man apt-get:

           remove is identical to install except that packages are removed instead of installed. Note
           that removing a package leaves its configuration files on the system. If a plus sign is
           appended to the package name (with no intervening space), the identified package will be
           installed instead of removed.

           purge is identical to remove except that packages are removed and purged (any configuration
           files are deleted too).

So, when you remove package(s) usually by using Ubuntu-Software-Center or by sudo apt-get remove, it leaves its configuration files on system.

From community help,

While there is no built in way to remove all of your configuration information from your removed packages you can remove all configuration data from every removed package with the following command.

dpkg -l | grep '^rc' | awk '{print $2}' | xargs dpkg --purge

So, Run following command from terminal:

dpkg -l | grep '^rc' | awk '{print $2}' | sudo xargs dpkg --purge

This will removes configuration files from removed package.

  • 2
    this also: dpkg -l | grep '^rc' | awk '{print $2}' | xargs sudo apt-get --purge remove -y
    – TPPZ
    Oct 5, 2019 at 17:43

Those listed package are just those that have configuration files that hasn't been removed. Unless you are planning to reinstall the packages again, and want to keep the configuration, yes, you can remove them safely. In synaptic, you can purge them by selecting them all, use the Package menu, then Purge. You can do this from the terminal too:

dpkg -l | grep '^rc' | awk '{print $2}' | xargs sudo apt-get purge
  • 7
    For me on Ubuntu 18.04 this does not work. However, it works if i add --yes option to the last command: xargs sudo apt-get --yes purge. Or else if i replace it with xargs sudo dpkg --purge.
    – Alexey
    Feb 6, 2020 at 10:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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