Sunday, April 28, 2024
 Popular · Latest · Hot · Upcoming
36
rated 0 times [  36] [ 0]  / answers: 1 / hits: 15303  / 2 Years ago, sun, july 10, 2022, 7:53:56

As an Ubuntu noob, I install and uninstall a lot of packages, to try them out. However, for months, I made the mistake of using apt-get remove instead of apt-get purge, which I didn't even realize exists.



Is there a way to cause apt-get to purge every package I've uninstalled? My system is full of leftover files I neither want or need from dozens of different packages.


More From » apt

 Answers
3

A simpler alternative, using aptitude (not installed by default)



sudo aptitude purge '~c'


~c is an aptitude search pattern, it means 'Select packages that were removed but not purged'. (The single quotes are to prevent the possible expansion of ~c by the shell as the home directory of a user c.)



Note that purging will remove system configuration files, usually located in /etc, but personal configuration files, usually in some hidden directory in your home, are not removed (it is not always simple to know which they are).


[#35861] Tuesday, July 12, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
tocklftime

Total Points: 110
Total Questions: 109
Total Answers: 100

Location: Mayotte
Member since Mon, Sep 12, 2022
2 Years ago
;