Hi,
I'm backing up my LM 11 installation and would like to clean up the residual config files.
I run Synaptic, go to the "Not Installed (Residual Config)" section, select the entries there, and mark them for removal. This usually works fine... But when I do this now, the "Apply" button stays disabled and I can't perform the removal.
I thought perhaps Synaptic was preventing me from removing something important---but I've tried it with individual entries, and the same thing occurs.
Any idea why, and what I can do about it? Thanks!
Can't clean up residual packages?
Forum rules
Before you post please read how to get help
Before you post please read how to get help
-
- Level 1
- Posts: 22
- Joined: Sat Oct 31, 2009 7:07 am
Re: Can't clean up residual packages?
Open up a terminal and paste this in:
sudo aptitude purge ~c
sudo to use root priveleges, aptitude to point to the program that is being used (in this case the packager, aptitude), purge ~c to tell that program what to do.
Also, you might find it useful to have an alias for cleaning things up. Just paste in the terminal:
alias cleanup='sudo apt-get clean; sudo apt-get autoclean; sudo apt-get autoremove && sudo aptitude purge ~c'
Now whenever you type cleanup in, it'll do all that.
sudo aptitude purge ~c
sudo to use root priveleges, aptitude to point to the program that is being used (in this case the packager, aptitude), purge ~c to tell that program what to do.
Also, you might find it useful to have an alias for cleaning things up. Just paste in the terminal:
alias cleanup='sudo apt-get clean; sudo apt-get autoclean; sudo apt-get autoremove && sudo aptitude purge ~c'
Now whenever you type cleanup in, it'll do all that.
Re: Can't clean up residual packages?
DarkRubySage: That worked perfectly. Thanks for the helpful reply.
Just one question: Why the tilde (~) before the "c" parameter? I've used lots of command-line stuff, but parameters were always preceded by hyphens (-). Tilde means something different? I've looked through the aptitude docs but didn't see anything about that.
Well, okay, another question---about setting that alias: I thought you had to add aliases to your .bashrc file to make them persistent. If you just use "alias" at a command line, doesn't it work for the current session only?
Cheers, A.
Just one question: Why the tilde (~) before the "c" parameter? I've used lots of command-line stuff, but parameters were always preceded by hyphens (-). Tilde means something different? I've looked through the aptitude docs but didn't see anything about that.
Well, okay, another question---about setting that alias: I thought you had to add aliases to your .bashrc file to make them persistent. If you just use "alias" at a command line, doesn't it work for the current session only?
Cheers, A.
- ThistleWeb
- Level 5
- Posts: 889
- Joined: Fri Mar 25, 2011 9:59 am
- Location: Scotland
- Contact:
Re: Can't clean up residual packages?
I suspect the tilda was a typo, the only context I know for tilda is that it's a shortcut for the users /home so ~/Documents means /home/username/Documents. I've never seen it used in any command. The - is about adding a flag to the command, it's always a - never a ~ as far as I know. It helps if people wrap commands in the
Code: Select all
tag, so they show up in monospace fonts separately, rather than add fancy bold italics.
Crivens!
Re: Can't clean up residual packages?
http://superuser.com/questions/28781/ho ... tch-to-kde
http://linuxcentral.wordpress.com/tag/aptitude/
--some reason(s) why you might do a purge
Apt, on the other hand doesn't do that; might be considered a safer approach (for GUI drivers), but if you know what you are doing with the command line and what purging does, it shouldn't be a big issue..
- Note that the purge command has an oddity: it purges items you remove explicitly, but only removes any automatically removed dependent packages
The ~c search in aptitude finds any packages that were removed but not purged in the first removal.
http://linuxcentral.wordpress.com/tag/aptitude/
- So you know what’s happening, here’s a brief explanation of what the command does. aptitude search -c returns the list of deinstalled packages.
--some reason(s) why you might do a purge
Apt, on the other hand doesn't do that; might be considered a safer approach (for GUI drivers), but if you know what you are doing with the command line and what purging does, it shouldn't be a big issue..
Last edited by DrHu on Mon Jul 04, 2011 3:16 pm, edited 1 time in total.