Getting list of installed packages for later re-installation

Anthony Yarusso tonyyarusso at earthlink.net
Tue Jul 4 21:12:56 UTC 2006


There's actually a built-in mechanism for this in dpkg.  See
http://lists.debian.org/debian-user/2003/09/msg00152.html for reference.

Alexander Skwar wrote:
> Hello!
>
> To (maybe) fix my problems with Dapper, I'd like to reinstall Dapper.
> After finishing the installation, I'd like to re-install all the
> now missing packages and remove the unneeded packages, so that I'll
> have all the packages installed, that I've now got installed. What's
> the best way to do this?
>
> To get a list of the installed packages, I wanted to do:
>
>     dpkg -l | awk '{print $2}' > ListOfInstalledPackages.txt
>
> And to later reinstall those packages, I tought about:
>
>     apt-get install `cat ListOfInstalledPackage.txt`
>
> Will this work? Will this install all those packages that are missing
> from the new installation? How about removing the unneeded packages -
> will they be removed? Because of the "install" command, I "suspect"
> not :)
>
> How would I go about this?
>
> Thanks,
>
> Alexander Skwar


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 254 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20060704/3f72dc9a/attachment.sig>


More information about the ubuntu-users mailing list