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

Re: correcting dpkg status before upgrading



Kenny Wickstrom writes ("correcting dpkg status before upgrading"):
> I have several packages that are installed and seem to be working fine.  
> However, dpkg --list reveals that some of the packages' status is 
> Installed but the Desired is Purge.  How do I change these packages so 
> that their status and desired states are both Installed?  Is there a way 
> to do this without editing the status file?  My dpkg is 0.93.42.3.

I think your system got that way when you used an old version of dpkg
manually.

You can fix the problem by using `dselect' - I'd upgrade to the latest
dpkg if I were you.  Then you can just select the anomalous packages
using `+' in dselect's package list display.

Alternatively, you can reinstall the packages in question.  dpkg
--selected-only (or, on older dpkg's, dpkg --no-also-select) won't
process them, because they're marked as `not wanted on the system', so
if you do this you'll have to make sure dpkg only sees (via explicit
listing on the command line or using --recursive) the packages you
want.

Editing the status file is fairly safe: if you do a global
search-and-replace on `<newline>Status: purge ok installed<newline>',
changing it to `<newline>Status: install ok installed<newline>' you
should be OK.

Keep a backup, and check that dpkg will still read the file after
you've edited it :-).

Ian.


Reply to: