LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 01-08-2009, 07:41 PM   #1
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,249

Rep: Reputation: 49
Set the status of "purge" packages - dpkg --get-selections


On doing following on my Lenny system:

Code:
dpkg --get-selections > packages.txt
I got the following output with some packages' status as "purge" or "deinstall" like this:

Code:
................
libsepol1                                       install
libsigc++-2.0-0c2a                              deinstall
libslang2                                       install
libsplashy1                                     install
libss2                                          install
libssl0.9.8                                     install
libstdc++6                                      install
libsysfs2                                       install
libtext-charwidth-perl                          install
libtext-iconv-perl                              install
libtext-wrapi18n-perl                           install
libts-0.0-0                                     install
libusb-0.1-4                                    install
libuuid1                                        install
libvolume-id0                                   install
libwrap0                                        install
libx11-6                                        install
libx11-data                                     install
libxapian15                                     deinstall
....................
logrotate                                       install
lsb-base                                        install
lsof                                            install
lzma                                            purge
make                                            install
makedev                                         install
man-db                                          install
manpages                                        install
mawk                                            install
mdetect                                         install
minicom                                         install
mktemp                                          install
module-init-tools                               install
mount                                           install
nano                                            install
ncurses-base                                    install
ncurses-bin                                     install
net-tools                                       install
netbase                                         install
openssh-blacklist                               purge
openssh-client                                  install
openssh-server                                  install
passwd                                          install
.............
The packages are shown as purge because I had attempted to remove them but was not able to remove them because of dependency errors.

Also the packages that are shown as "deinstall" are removed on my system. How do I remove these packages from the listing.

How do I set the status of those packages (which are shown as "pruge") back to "install" again? I am fine with not removing them.

I use apt-get as my package manager.
 
Old 01-08-2009, 08:01 PM   #2
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,249

Original Poster
Rep: Reputation: 49
Sorry folks. I think I found the answer to this one. If anybody wants to know just let me know and I will post it.

Thanks
 
Old 01-09-2009, 08:34 AM   #3
the trooper
Senior Member
 
Registered: Jun 2006
Location: England
Distribution: Debian Bullseye
Posts: 1,508

Rep: Reputation: Disabled
I'd be interested in the solution.
 
Old 01-09-2009, 09:00 AM   #4
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Northeast Ohio
Distribution: linuxdebian
Posts: 7,249
Blog Entries: 5

Rep: Reputation: 191Reputation: 191
That listing is used if you wish to setup an identical system as far as packages go.

Packages that are installed by default in the system will be listed as purged or de-install so the new system you transfer this package list to will know that is what it is supposed to do with those packages


Original System
Code:
dpkg --get-selections > packages.txt
copy the packages.txt file to the new machine
Code:
dpkg --set-selections < packages.txt

apt-get dselect-upgrade
The new machine will now install and remove packages according to what is in the list. .
 
Old 01-09-2009, 09:42 AM   #5
the trooper
Senior Member
 
Registered: Jun 2006
Location: England
Distribution: Debian Bullseye
Posts: 1,508

Rep: Reputation: Disabled
Thanks Farslayer.
Is it possible to use the apt-get dselect-upgrade command with aptitude instead?.Or does it not matter in this case.

Regards.
The trooper.
 
Old 01-09-2009, 10:17 AM   #6
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Northeast Ohio
Distribution: linuxdebian
Posts: 7,249
Blog Entries: 5

Rep: Reputation: 191Reputation: 191
I don't believe aptitude is aware of the dselect-upgrade option. This means packages wont get flagged as automatically installed by Aptitude.

Since this is typically the fist thing you would do on a system if you were going for an identical packages selection, I would probably just do the apt-get dselect-upgrade then follow it up with aptitude keep-all, and use aptitude from that point forward.




Sure wish I could find a more recent reference for that info..
 
Old 01-09-2009, 10:33 AM   #7
the trooper
Senior Member
 
Registered: Jun 2006
Location: England
Distribution: Debian Bullseye
Posts: 1,508

Rep: Reputation: Disabled
Quote:
Originally Posted by farslayer View Post
I don't believe aptitude is aware of the dselect-upgrade option. This means packages wont get flagged as automatically installed by Aptitude.

Since this is typically the fist thing you would do on a system if you were going for an identical packages selection, I would probably just do the apt-get dselect-upgrade then follow it up with aptitude keep-all, and use aptitude from that point forward.




Sure wish I could find a more recent reference for that info..
Just goes to prove you learn something new everyday!
Will make a note of this.

Last edited by the trooper; 01-09-2009 at 10:37 AM.
 
Old 01-09-2009, 11:48 AM   #8
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,249

Original Poster
Rep: Reputation: 49
Ooops...Sorry for the delay....Looks like farslayer has posted the solution already. Thank you.
 
  


Reply



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
Getting "Short read in buffer_copy" error with "dpkg" stalefries Linux - Software 6 03-24-2010 03:19 PM
E:dpkg was interrupted,you must manually run"dpkg --configure -a" to correct problem loplop4 Debian 5 09-29-2008 11:11 AM
Feeding the output of "diff" or "cat" command to dpkg --purge kushalkoolwal Debian 9 06-19-2008 07:27 AM
How do I get rid of those "rc" packages? (As seen in dpkg -l output) johnMG Debian 5 02-27-2006 02:08 AM

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

All times are GMT -5. The time now is 10:00 PM.

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
Open Source Consulting | Domain Registration