Pre-emptive Request: Backing up installed packages.

Darryl Clarke smartssa at gmail.com
Thu Jan 26 08:08:58 UTC 2006


On 26/01/06, James Gray <james at grayonline.id.au> wrote:
> On Thu, 26 Jan 2006 18:46, Darryl Clarke wrote:
> > On 26/01/06, Michael T. Richter wrote:
> > > I'm getting the distinct impression that I'm going to have to resort to
> > > backing up /home and reinstalling Ubuntu to get access to my audio
> > > hardware again.  The problem is that I've downloaded and installed an
> > > obscene number of packages from Synaptic.  (It's really quite
> > > addictive, isn't it?)  Is there any convenient way to automate getting
> > > a list of packages that have been installed placed on a file somewhere
> > > and then automagically reinstalling them without having to select them
> > > one by one through Synaptic?  (And, too, a convenient way to backup the
> > > repository information?)
> >
> > Here's my quick and dirty way to get a list which can then be 'read'
> > by synaptic to reinstall everything.  Synaptic will happily ignore
> > things already installed:
> >
> > for i in `dpkg -l | cut -f3 -d\  `;
> >     do echo "$i\tinstall" >> installed.txt;
> > done
> >
> > If anybody knows a better way, let me know ;)
>
> Hi Darryl,
>
> Believe it or not, this is actually built into "dpkg" - you're reinventing
> the wheel dude :)  Albeit very elegantly mind you ;)
>
> dpkg --get-selections > installed.txt
>
> "man dpkg" :P

Haha... Awesome.

For some reason --get-selections never really dawned on me as doing just that.

--
~ Darryl  ~ smartssa at gmail.com
http://smartssa.com / http://darrylclarke.com




More information about the ubuntu-users mailing list