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

Re: How to rebuild package database (Update)

On Fri, Mar 14, 2008 at 08:55:23PM +0100, Hans-J. Ullrich wrote:
> Hi all, 
> accidently I crashed my package database with 
> dpkg --set-selections < packagelist.txt
> Now aptitude wants to delete a lot and reinstall other packages, which are 
> already installed. 
> I want to correct my database to the already installed package. There is 
> another file with the list of the already installed packages available, which 
> was created by synaptic.
> How can I teach aptitude, to read this file and let it generate an up-to-date 
> database ?

Unless one of the backup files in /var/lib/dpkg for status and such
happen to be valid, then there is no way to restore it since the
database is the primary source (and probably only) source of the

I also fail to imagine how dpkg --set-selections could cause any
problems.  All it does is change the setting on packages to indicate
which should be installed and (if you had any packages that were removed
but not purged) flag some for removal.  Packages that were fully purged
won't change state since they should be in the list in the first place.

There should not be any way it could cause reinstall of packages, only
install or remove when you use --set-selections.

Len Sorensen

Reply to: