Reinstalling a system from package list?

Alan Holt berber.it at gmail.com
Wed Apr 14 20:42:24 UTC 2010


It's very easy, just do this next steps:

# sudo dpkg --get-selections > installed-applications.txt

On new system do this:

# sudo dpkg --set-selections < installed-applications.txt

# sudo apt-get -y update
# sudo apt-get dselect-upgrade


Thats all, good luck!

2010/4/14 Tom H <tomh0665 at gmail.com>

> On Wed, Apr 14, 2010 at 2:46 PM, Rashkae <ubuntu at tigershaunt.com> wrote:
> > Maxime Alarie wrote:
> >
> >> Im just  curious if there is a way to reinstall a system from  the
> >> output of dpkg -list
> >>
> >> Let's say I have a crash, I reinstall the base system and then want to
> >> reinstall all the packages I had  before the crash... I, like many
> >> others I'm sure,  usually Install a system then proceed to install other
> >> packages  along the way to suit  my  needs. But we do not keep a trace
> >> of those  small packages installed for this dependency or that small
> >> program we want to try..
>
> >
> http://www.linuxforums.org/forum/debian-linux-help/40955-need-list-installed-packages.html
>
> You can use "dpkg -l" as shown in the link above or
> Dump the package selection states to a file with
> dpkg --get-selections > instselect.txt
> Transfer that file to the new box and install the packages with
> dpkg --clear-selections
> dpkg --set-selections < instselect.txt
>
> AFAIK, these two methods do not preserve the status
> automatically-installed packages; everything ends up being registered
> as a manual install.
>
> I have not tried the following but it should preserve the automatic states.
>
> Select the packages that are installed but not installed automatically with
> aptitude search -F "%p" '~i!~M' > instman.txt
> Transfer that file to the new box  and install the packages with
> aptitude install `cat  instman.txt`
> The previously-automatically-installed packages should be pulled in
> automatically.
>
> --
> ubuntu-users mailing list
> ubuntu-users at lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20100414/1edbb6bf/attachment.html>


More information about the ubuntu-users mailing list