Ubuntu Forums ubuntu.com - launchpad.net - ubuntu help  

Go Back   Ubuntu Forums > The Ubuntu Forum Community > Other Community Discussions > Tutorials & Tips
Register Reset Password Forum Help Forum Council Search Today's Posts Mark Forums Read

Tutorials & Tips
The place to find Ubuntu related Tips & Tricks.

 
Thread Tools Display Modes
Old February 2nd, 2009   #1
dcstar
Ubuntu addict and loving it
 
Join Date: Feb 2005
Location: Melbourne, Australia
Beans: 7,836
Ubuntu 9.04 Jaunty Jackalope
Smile HOWTO Reinstall all of your current packages if you do a fresh Ubuntu install

People sometimes have to do a reinstall of their Ubuntu system for various reasons (been playing/experimenting with configuration/drivers/other packages or just because something is badly broken) but remembering all the extra packages you have installed can be a chore - but here is the simple solution:


On your old system (assuming it is still working), start up Synaptic and go:
File-Save Markings and choose a file name along with a location (like a USB drive) that you can use when you have installed your new system)
This file contains a list of all your currently installed packages, and when you have installed and booted up your new system (and configured your repositories to the best for your location - as we all do, don't we?) then start up Synaptic and go:
File-Read Markings and point it at your saved file, and after that has completed then select Apply to kick off the download & installation of all of those packages you had installed previously!

There are also apt-get command line functions that achieve the same outcome, so those who don't have/use Synaptic can still do this.

You will still have to do any special configuration changes that you had on the old system, but at least all of the packages are now in the new system.

This is also very handy for moving to new hardware/duplicating setups etc.

Be aware that doing this between different Ubuntu versions may cause complications because some packages may not be in a later version or have different names.
__________________
Regards, David.

The Forum search function is useful for immediate help (give it a try).
Please mark your thread as "Solved" (using the Thread Tools) when appropriate.
dcstar is offline   Reply With Quote
Old February 4th, 2009   #2
wersdaluv
May the Ubuntu Be With You!
 
wersdaluv's Avatar
 
Join Date: Dec 2006
Location: Pilipinas kong Mahal
Beans: 1,713
Ubuntu 9.04 Jaunty Jackalope
Re: HOWTO Reinstall all of your current packages if you do a fresh Ubuntu install

Wow. Already on Lifehacker.com but still got no reply.

Great points! Took note of 'em. Thanks!

http://lifehacker.com/5146028/save-s...reinstallatoin
wersdaluv is offline   Reply With Quote
Old February 4th, 2009   #3
iwfur25
First Cup of Ubuntu
 
Join Date: Jan 2009
Beans: 3
Re: HOWTO Reinstall all of your current packages if you do a fresh Ubuntu install

/var/cache/apt/archives contains the downloaded packages. Back it up (if you have the space) and restore it along with the markings and apt won't have to re-download all (or maybe most?) of the packages.
iwfur25 is offline   Reply With Quote
Old February 4th, 2009   #4
inod3
First Cup of Ubuntu
 
Join Date: Aug 2008
Beans: 2
Ubuntu 8.10 Intrepid Ibex
Re: HOWTO Reinstall all of your current packages if you do a fresh Ubuntu install

Quote:
On your old system (assuming it is still working), start up Synaptic and go:
File-Save Markings and choose a file name along with a location (like a USB drive) that you can use when you have installed your new system)
This file contains a list of all your currently installed packages
Sorry, but its not working for me:

Ubuntu 8.10

System -> administration -> synaptic package manager *click*
File -> Save Marking As... *click*
$ cat <filename>
$

Nothingness. Same for option 'Save Markings'.
inod3 is offline   Reply With Quote
Old February 4th, 2009   #5
dazzlindonna
A Carafe of Ubuntu
 
dazzlindonna's Avatar
 
Join Date: Feb 2008
Location: Louisiana, USA
Beans: 96
Ubuntu 9.04 Jaunty Jackalope
Re: HOWTO Reinstall all of your current packages if you do a fresh Ubuntu install

Wow, great tip. I had not noticed that option in Synaptic. Thanks!
__________________
You'll never shine if you don't glow
dazzlindonna is offline   Reply With Quote
Old February 4th, 2009   #6
MayOne.Net
Spilled the Beans
 
Join Date: Dec 2006
Beans: 14
Re: HOWTO Reinstall all of your current packages if you do a fresh Ubuntu install

Don't forget to backup your sources before you reinstall.

Code:
sudo cp /etc/apt/sources.list ~/sources.list.backup
Otherwise if you have added any PPAs or other sources, this tip won't work.
MayOne.Net is offline   Reply With Quote
Old February 4th, 2009   #7
obscur156
Gee! These Aren't Roasted!
 
obscur156's Avatar
 
Join Date: Feb 2007
Location: Montreal,Quebec ,canada
Beans: 189
Ubuntu Jaunty Jackalope (testing)
Send a message via ICQ to obscur156
Re: HOWTO Reinstall all of your current packages if you do a fresh Ubuntu install

Hi all,i was doing something look a like but via the terminal.
With one command you can install all your apps in one shot.

Example:

sudo aptitude install firestarter krusader amsn ktorrent amarok devede k3b vlc ksnapshot netspeed audacity timer-applet convertall gtkhash bleachbit

You can install as much as you want,it makes no difference.
You save your command with openoffice word or what ever to a USB KEY (drive) and copy and paste to the terminal on the next install.

Voila,Best regards.
__________________
http://www.getdeb.net/ http://linux.softpedia.com/
Can't live without Opera and i hope i have helped you.Don't fear to change.Post your results please so others can use this valuable information.
obscur156 is offline   Reply With Quote
Old February 4th, 2009   #8
ZungBang
First Cup of Ubuntu
 
ZungBang's Avatar
 
Join Date: Mar 2007
Beans: 3
Re: HOWTO Reinstall all of your current packages if you do a fresh Ubuntu install

According to section 6.4.9 of the Debian Reference Manual, the following will save both the list of packages installed and their debconf configuration:

Code:
     # dpkg --get-selections "*" >myselections   # or use \*
     # debconf-get-selections > debconfsel.txt
and the following will reinstall and reconfigure them:

Code:
     # dselect update
     # debconf-set-selections < debconfsel.txt
     # dpkg --set-selections <myselections
     # apt-get -u dselect-upgrade    # or dselect install
ZungBang is offline   Reply With Quote
Old February 4th, 2009   #9
johnjohn2
Gee! These Aren't Roasted!
 
johnjohn2's Avatar
 
Join Date: Dec 2008
Location: /home/john/
Beans: 172
Ubuntu 8.10 Intrepid Ibex
Re: HOWTO Reinstall all of your current packages if you do a fresh Ubuntu install

Thanks dude worked like a charm
johnjohn2 is offline   Reply With Quote
Old February 5th, 2009   #10
kevmaster
5 Cups of Ubuntu
 
kevmaster's Avatar
 
Join Date: Jul 2007
Beans: 23
Re: HOWTO Reinstall all of your current packages if you do a fresh Ubuntu install

If you run a server, and don't have a graphical interface, you can still do it with apt:

http://kevin.vanzonneveld.net/techbl...selectupgrade/
__________________
Read my techblog @ http://kevin.vanzonneveld.net
kevmaster is offline   Reply With Quote

Bookmarks

Tags
current configuration, packages, reinstall

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 02:36 AM.


vBulletin ©2000 - 2010, Jelsoft Enterprises Ltd. Ubuntu Logo, Ubuntu and Canonical © Canonical Ltd. Tango Icons © Tango Desktop Project. lingonberry