Dec 23, 2025 - 09:30 PMDeutsch | English
Hello unlogged user [ Register | Log in ]

Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
LRC
Post subject: Location package list file  PostPosted: Nov 22, 2006 - 05:42 AM



Joined: Apr 21, 2006
Posts: 152
Location: Ice and Snow
I resently installed 2006-01-RC4 over my old 2005-4 installation. I seem to remember at one point the script mentioning saving an old package list file in some folder. Would anyone know which folder it was placed. I was n a hurry and didn't make a note. It is more as an instrest to see if there are packages I really would like back but cannot recall at the moment.
 
 View user's profile Send private message  
Reply with quote Back to top
gs
Post subject: Location package list file  PostPosted: Nov 22, 2006 - 05:50 AM



Joined: Jan 06, 2005
Posts: 638

to my knowledge it is a text file which is saved in the /home directory. Somewhere in FAQ or forum - use search function - is explained what to write in a konsole to reinstall the packages, best after editing the old-packages-list...


Last edited by gs on Nov 22, 2006 - 05:51 AM; edited 1 time in total
 
 View user's profile Send private message  
Reply with quote Back to top
Crest
Post subject: RE: Location package list file  PostPosted: Nov 22, 2006 - 05:50 AM



Joined: Oct 03, 2006
Posts: 415
Location: Berlin
Excerpt from the FAQ:

Reinstall of Packages Deleted During the Upgrade

With the help of this old-packages file, these packages can be reinstalled

# cd /root
# apt-get install $(<old-packages-yyyymmdd.txt

It is advisable before reinstalling to edit this list, so you can delete packages you don't want re-installed.
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
LRC
Post subject: RE: Location package list file  PostPosted: Nov 22, 2006 - 06:07 AM



Joined: Apr 21, 2006
Posts: 152
Location: Ice and Snow
Thank you. Hadn't even thought of that possibility. Next time I'll tryand remember that. Would make my life alot easier. As a side issue then, is there a way I can make a similar list, but of current packages. Would make my life easier to find out what I probably just as soon avoid from any mistakes I made last time around.
 
 View user's profile Send private message  
Reply with quote Back to top
gs
Post subject: RE: Location package list file  PostPosted: Nov 22, 2006 - 06:38 AM



Joined: Jan 06, 2005
Posts: 638

typing dpkg -l in Konsole shows all packages installed.
There is a thread on the topic, although in German, giving more details:

http://kanotix.com/index.php?name=PNphp ... +installed
 
 View user's profile Send private message  
Reply with quote Back to top
mzilikazi
Post subject:   PostPosted: Nov 22, 2006 - 04:27 PM
Team Member
Team Member


Joined: Dec 17, 2003
Posts: 1109
Location: Ganymede
Code:
dpkg -l
shows you the output formatted like this::
Code:
ii  acpi                                       0.09-1                              displays information on ACPI devices
ii  acpid                                      1.0.4-5                             Utilities for using ACPI power management
ii  adduser                                    3.99                                Add and remove users and groups

BUT apt will puke and die if it tries to read that so a simple way to make a kicklist of packages currently installed:
Code:
dpkg -l|grep ii|awk '{print $2}' |sed '1,5d'>packages.txt


and it gets formatted like this:
Code:
acpi
acpid
adduser


Now you can feed apt the list:
Code:
apt-get install $(<packages.txt)


There are several utilities/scripts out there that provide the same functionality if you want to look into it even further.

_________________
Ubuntu - An ancient African word for "Can't install Debian"
 
 View user's profile Send private message Send e-mail Visit poster's website  
Reply with quote Back to top
h2
Post subject:   PostPosted: Nov 22, 2006 - 06:34 PM



Joined: Mar 12, 2005
Posts: 1005

dpkg -l | cut -d ' ' -f 3 >> packages.txt

if you want it a bit simpler will do the same thing.

_________________
Read more on dist-upgrades using du-fixes-h2.sh script.
New: rdiff-backup script
 
 View user's profile Send private message  
Reply with quote Back to top
LRC
Post subject:   PostPosted: Nov 23, 2006 - 12:45 AM



Joined: Apr 21, 2006
Posts: 152
Location: Ice and Snow
Thankyou very much for all you help and sugestions. h2 gave me exactly what I wanted.
 
 View user's profile Send private message  
Reply with quote Back to top
mzilikazi
Post subject:   PostPosted: Nov 23, 2006 - 02:06 AM
Team Member
Team Member


Joined: Dec 17, 2003
Posts: 1109
Location: Ganymede
h2 wrote:
dpkg -l | cut -d ' ' -f 3 >> packages.txt

if you want it a bit simpler will do the same thing.


Well actually that does not work. 2 problems:

1) dpkg -l will also show you packages that are NOT installed but were at one time.

These are noted by 'rc' like so:
Code:
dpkg -l|less
ii  abcde                                 2.3.99.6-1                          A Better CD Encoder
rc  acm                                   5.0-23                              A multi-player aerial combat simulation

snip

So......abcde is installed but acm is not.
A kicklist made from this output will also install pkgs you thought you'd removed. Use grep ii

2) You are left with some garbage at the beginning of the file.
apt will barf. Try it. Winken Use sed '1,5d'


If you prefer cut over awk this works:
Code:
dpkg -l|grep ii|cut -d ' ' -f 3|sed '1,5d'>packages.txt

Code:
dpkg -l|grep ii|awk '{print $2}'|sed '1,5d'>packages.txt

Is there a shorter, better, faster, smarter way?
Maybe............... but once it's in a script it's all good.
As it stands you'll need to open the file in a text editor and prepare to remove (not comment) anything that apt cannot find. apt will immediately halt at this point.

Now what would be a cool addition to this rather puny script would be the ability to skip over any packages that are not available and simply dump them to a text file. You could also very easily make the outputted packages.txt be named for the date the file was made. Nice for archival purposes. Probably though we are reinventing an existing wheel! Smilie h2?

_________________
Ubuntu - An ancient African word for "Can't install Debian"
 
 View user's profile Send private message Send e-mail Visit poster's website  
Reply with quote Back to top
LRC
Post subject:   PostPosted: Nov 25, 2006 - 05:58 AM



Joined: Apr 21, 2006
Posts: 152
Location: Ice and Snow
Good point as I have a lot of extras floting around that aren't installed. Thanx
 
 View user's profile Send private message  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT + 1 Hour
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2007 The PNphpBB Group
Credits
 
Deutsch | English
Logos and trademarks are the property of their respective owners, comments are property of their posters, the rest is © 2004 - 2006 by Jörg Schirottke (Kano).
Consult Impressum and Legal Terms for details. Kanotix is Free Software released under the GNU/GPL license.
This CMS is powered by PostNuke, all themes used at this site are released under the GNU/GPL license. designed and hosted by w3you. Our web server is running on Kanotix64-2006.