[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How can I get dselect's selection to match what's installed?



* Stan Brown (stanb@awod.com) [011005 12:07]:
> OK, somehow I'v _reallY- got dselct's selection list munged up. It want's
> to dlete 200+ packages!
> 
> How can I (short of spending hours ding it by hand), get dslect's "desired"
> selection to match what's installed on the system?

I don't know of a clean way to do it within dselect, but here's a few
tips on the dpkg system in general:

You can get a list of all packages marked for removal with

dpkg --get-selections | grep deinstall

or set them all back to install with this:

dpkg --get-selections | sed -e 's/deinstall/install/' | dpkg --set-selections


but that will only work if you really want to install all the files
marked for deinstallation. use the first command above to check the list
and see if it seems reasonable.

Also, you should take a look at /var/lib/dpkg/status-old ; it should
have the selections you want in it. If so, just copy it over
/var/lib/dpkg/status (I'd recommend keeping a backup just in case).
Probably the easiest way to inspect it is this:

cp /var/log/dpkg/status /root/status.backup
cp /var/log/dpkg/status{-old,}
dselect

use dselect to check out the state and see if it's what you want. If
it's good, then you're done! If it's bad, then restore the backup and
you're where you started. It might also land somewhere in the middle:
better than where you are now, but not exactly the selections you want.


In the future, remember that you can always use 'R' in dselect to revert
selections, and if you get really stuck in something, use 'X' to back
out abandoning all the changes you made.

good times,

-- 
Vineet                                   http://www.anti-dmca.org
Unauthorized use of this .sig may constitute violation of US law.
echo Qba\'g gernq ba zr\!             |tr 'a-zA-Z' 'n-za-mN-ZA-M'

Attachment: pgp9SieM0ROQM.pgp
Description: PGP signature


Reply to: