Can't clean up residual packages?

Questions about applications and software
Forum rules
Before you post please read how to get help
Post Reply
ander111
Level 3
Level 3
Posts: 152
Joined: Sat Jul 17, 2010 5:18 am

Can't clean up residual packages?

Post by ander111 »

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!
DarkRubySage
Level 1
Level 1
Posts: 22
Joined: Sat Oct 31, 2009 7:07 am

Re: Can't clean up residual packages?

Post by DarkRubySage »

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.
ander111
Level 3
Level 3
Posts: 152
Joined: Sat Jul 17, 2010 5:18 am

Re: Can't clean up residual packages?

Post by ander111 »

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.
User avatar
ThistleWeb
Level 5
Level 5
Posts: 889
Joined: Fri Mar 25, 2011 9:59 am
Location: Scotland
Contact:

Re: Can't clean up residual packages?

Post by ThistleWeb »

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!
User avatar
DrHu
Level 17
Level 17
Posts: 7521
Joined: Wed Jun 17, 2009 8:20 pm

Re: Can't clean up residual packages?

Post by DrHu »

http://superuser.com/questions/28781/ho ... tch-to-kde
  • 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.
--What the ~c is doing

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.
aka removed/deleted 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.
Post Reply

Return to “Software & Applications”