Pre-emptive Request: Backing up installed packages.

James Gray james at grayonline.id.au
Thu Jan 26 08:01:32 UTC 2006


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

Cheers,

James
-- 
"You can't survive by sucking the juice from a wet mitten."
		-- Charles Schulz, "Things I've Had to Learn Over and
		   Over and Over"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20060126/eca51f8b/attachment.sig>


More information about the ubuntu-users mailing list