LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 12-15-2005, 11:11 AM   #1
mandavi
LQ Newbie
 
Registered: Nov 2004
Location: berlin
Distribution: ubuntu 6.06
Posts: 21

Rep: Reputation: 15
how to save a list of installed packages and install these packages later


i screwed my system by changing file permissions recursively from the root folder and want to install ubuntu new now - without all the work of going through the package list and pick all the useful packages again.
i found out that i can get a list with 'dpkg -l' but failed when i wanted to store that in a file - nor do i know how to tell dpkg later to install all these packages again.

help would be much appreciated

mandavi
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 12-15-2005, 11:26 AM   #2
ssfrstlstnm
Member
 
Registered: Dec 2004
Location: IN, USA
Distribution: debian etch
Posts: 402

Rep: Reputation: 30
Try this
Code:
dpkg -l > filename
that should store the installed packages in filename. I don't know of anyway to reinstall packages from that list, but the packages are not so important as the config files. You can quickly go through and reinstall packages, but getting everything reconfigured from scratch can be painful. I would suggest that you back up /etc and everything in /home/username that begins with "."
 
Old 12-15-2005, 11:32 AM   #3
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 4,170

Rep: Reputation: 244Reputation: 244Reputation: 244
Quote:
Originally Posted by mandavi
i screwed my system by changing file permissions recursively from the root folder and want to install ubuntu new now - without all the work of going through the package list and pick all the useful packages again.
i found out that i can get a list with 'dpkg -l' but failed when i wanted to store that in a file - nor do i know how to tell dpkg later to install all these packages again.

help would be much appreciated

mandavi

dpkg --get-selections > selections.txt save the .txt file to a safe place then once reinstalled dpkg --set-selections < selections.txt followed by dselect update and apt-get dselect-upgrade show give you back your installed packages.
 
2 members found this post helpful.
Old 08-15-2006, 01:48 AM   #4
dl7und
LQ Newbie
 
Registered: Apr 2006
Posts: 3

Rep: Reputation: 0
That was a very useful advice, Happytux, thanks a lot! As ssfrstlstnm said, config files are important too, but it is also impossible to remember all packages installed on a machine.

So, to replicate a machine (on different architecture, for example), one will need the package list AND the config files... I just went through this (different CPU architecture) and Happytux's advice made it a very easy job...
 
Old 08-15-2006, 09:27 AM   #5
cautious
Member
 
Registered: Jul 2006
Posts: 72

Rep: Reputation: 15
Along these same lines- is it possible to create an ISO of the whole configuration with all the tweaks, bells, and whistles that I've added to my Ubuntu install, such that I can migrate it to another hard drive?
 
Old 09-07-2009, 11:36 AM   #6
nopposan
LQ Newbie
 
Registered: Sep 2009
Location: Montgomery County, MD. Metro D.C.
Distribution: Ubuntu, Xubuntu, Debian with Xfce
Posts: 1

Rep: Reputation: 0
Wink thanks and /home/yourhome/.config and all that

I know this is a really old thread and you authors have probably already got your questions answered. I just thought I'd say thanks for that bit about the dpkg --get-selections. I'm going to give it a try.

Also, for what it's worth, if you'd like to create your own Ubuntu Live install disk, you can try Ubuntu Customization Kit. There's also Remastersys. I may experiment with these myself. However, especially with regard to Ubuntu (as opposed to pure Debian), I would bet that it'll be easier to just do the dpkg --get-selections thing or save my package list for reinstallation.* Individual settings can be made default for all new users by storing them in /etc/skel. (That is you can store all of your .config type files that are in your personal home folder to /etc/skel and then all new users will get those configurations.) Furthermore, if you save your /home/.config files and your /etc/X11/xorg.conf and just copy them over to a new install, this combined with the same packages being installed should take care of just about all of the customization.

The only thing you won't get that way is the installation and configuration of proprietary drivers; that might be available through Ubuntu's System > Administration > Hardware Drivers though.

* Ubuntu's release cycle is incredibly fast -- every six months -- so if you create your own reinstall disk for the whole OS, it'll soon be obfuscated. That's why I think it's probably better just installing "Jiffy Jackalope" or whatever's the latest and greatest, then copying over the customizations and installing the preferred app's.

Cheers.
 
  


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
How to list all installed packages? bp12345 Debian 2 08-15-2005 08:06 AM
list installed debian packages Fernandoch Debian 4 07-07-2005 05:16 AM
List all packages installed by user BlueOrb Debian 2 06-21-2005 02:11 PM
list of installed packages jeff1500 Slackware 3 03-22-2004 04:52 PM
List all installed Packages? mikeshn Linux - General 1 12-02-2003 10:31 PM

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

All times are GMT -5. The time now is 04:52 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