Maintaining all packages when reinstalling the ubuntu OS?

Ric Moore wayward4now at gmail.com
Fri Jul 8 06:18:58 UTC 2011


On Fri, 2011-07-08 at 01:05 +0800, Goh Lip wrote: 
> On 07/08/2011 12:32 AM, Peng Yu wrote:
> > Hi,
> >
> > I need to reinstall ubuntu 10.04 LTS on my machine. But I'd like to
> > record what ubuntu packages are installed so that I can later on
> > reinstall these packages easily. I'm wondering if there is a command
> > to keep track of all the additional packages installed. It is better
> > that this information is dumped into a file so that it can be read
> > some other command to easily reinstall all these packages. Is there
> > such commands for saving the packages info and reinstall the packages?
> >
> 
> 
> To save the packages and have them installed without downloading again..
> 
> 
> sudo apt-get autoremove
> sudo apt-get autoclean
> sudo apt-get install dpkg-dev
> sudo cp /var/cache/apt/archives/*.deb /<some_file>
> cd /<that_file>
> sudo dpkg-scanpackages . /dev/null | gzip -9c > Packages.gz
> 
> Burn <that_file> to cdrom as data.
> At new installation,
> sudo apt-cdrom add
> 
> Then install any wanted packages as recorded down by Avi's method.
> 
> Regards - Goh Lip
> 
> ps: to keep conf files, put back any saved conf files in the relevent 
> places/paths.

I'd be very careful with that last bit. With a major jump from 8.04 to
10.4 there is bound to be some conf files that should not be restored.
The trick would be which ones? It might be better to leave the new conf
files in place and use the old ones as a reference to edit the new ones
by. Ric


-- 
My father, Victor Moore (Vic) used to say:
"There are two Great Sins in the world...
..the Sin of Ignorance, and the Sin of Stupidity.
Only the former may be overcome." R.I.P. Dad.
Linux user# 44256 





More information about the ubuntu-users mailing list