LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   Dpkg/dselect database mess up: Reset selections!! (https://www.linuxquestions.org/questions/debian-26/dpkg-dselect-database-mess-up-reset-selections-554884/)

ignasiet 05-18-2007 06:40 AM

Dpkg/dselect database mess up: Reset selections!!
 
Hi all,

I am running a server with Debian Sarge installed on it. I am quite newbie, and I have a problem with the dpkg database!!!

I think that someone else with sudo permisions ran dselect, and selected like 160 packages to be installed, and deselected some other 30 which are essential for the server (apache2, etc...).

The selected packages haven't been installed / upgraded / deinstalled, and I would like to cancel all these new selections.

I tried running "dpkg --set-selections <null.txt" with an empty file, but doesn't work.

Could someone please give me a light on it.
Thank you very much!!!

Dutch Master 05-19-2007 04:03 PM

This is exactly why I dislike sudo so much! If you look in the man-page for dpkg you'll find the options --clear-selections and --yet-to-unpack. I'd suggest to try these. Keep in mind to make a backup first:
Code:

dpkg --get-selections > selected.txt
and backup any data (and config files!) on that server. Finally, upgrade your server to Etch (the current stable). Perhaps you can get away with just issuing the apt-get dist-upgrade command. It might happen that apt goes looking for the latest packages w/o processing the packages from dselect. Keep in mind that in the upgrade a lot of packages are removed and newly installed...

ignasiet 05-21-2007 03:47 AM

Thanks a lot for your answer!
Unfortunately, my current version of dpkg doesn't have the "--clear-selections" features implemented!!
Anyway, I guess I could remove some file to do the same thing or upgrade this package only.

Could someone explain me how the apt thing works?.

I mean: what is this packages database? where is it stored? What kind of information does it keep?
Why can't I simply rollback the selections I made?
Thanks a lot!

Ignasi.

Daws 05-21-2007 10:40 AM

Look in /var/lib/dpkg/

The status file contains current package selections and their status. Usually the status-old (or is it status.old? can't remember) contains your previous database status. This could provide the roll-back, assuming you haven't changed the database since the original error occured.

ignasiet 05-22-2007 04:28 AM

I will have a look to those files then!

Thanks!!

Ignasi.


All times are GMT -5. The time now is 04:36 PM.