Maintaining all packages when reinstalling the ubuntu OS?

Avi lists at avi.co
Thu Jul 7 16:40:07 UTC 2011


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?
> 

dpkg --get-selections > somefile

on the current machine, and then

apt-get update
dpkg --set-selections < somefile
apt-get -u dselect-upgrade

On the new machine. This wont transfer any configuration, though.

-- 
Avi




More information about the ubuntu-users mailing list