LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 05-18-2007, 07:40 AM   #1
ignasiet
LQ Newbie
 
Registered: May 2007
Posts: 3

Rep: Reputation: 0
Unhappy 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!!!
 
Old 05-19-2007, 05:03 PM   #2
Dutch Master
Senior Member
 
Registered: Dec 2005
Posts: 1,686

Rep: Reputation: 124Reputation: 124
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...
 
Old 05-21-2007, 04:47 AM   #3
ignasiet
LQ Newbie
 
Registered: May 2007
Posts: 3

Original Poster
Rep: Reputation: 0
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.
 
Old 05-21-2007, 11:40 AM   #4
Daws
Member
 
Registered: May 2006
Location: UK
Distribution: Debian
Posts: 448

Rep: Reputation: 38
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.
 
Old 05-22-2007, 05:28 AM   #5
ignasiet
LQ Newbie
 
Registered: May 2007
Posts: 3

Original Poster
Rep: Reputation: 0
I will have a look to those files then!

Thanks!!

Ignasi.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
on denian, dselect use the base apt or dpkg? xcore_on Linux - Newbie 7 05-05-2006 12:26 AM
dpkg --get-selections still shows deinstall pljvaldez Debian 0 02-17-2006 02:41 PM
howto undo automated dependency selections in dselect entob Debian 1 08-11-2004 01:53 PM
undo selections in dselect phil_anderer Linux - Newbie 0 02-15-2004 12:17 PM
Help rolling back dselect selections anonc Debian 1 01-23-2004 05:09 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 10:47 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration