[NBLUG/talk] Deb packages//

troy fryman at sonic.net
Sat Jul 3 11:38:49 PDT 2004


On Sat, Jul 03, 2004 at 12:19:45AM -0700, Steve Johnson wrote:
> Is there a way to get a list of debian packages that are
> allready installed on a system?

Stick this in a cronjob on all your Debian machines:
#!/bin/sh
## restore with:
## apt-get update && apt-get install `cat /etc/installed.txt`

dpkg --get-selections | grep '[[:space:]]install$' | \
grep -v 'deinstall$' | awk '{print $1}' > /etc/installed.txt


Keep /etc/ backed up, and you can pretty much have a system
restored in the time it takes to download and install the packages.
/etc/ is so small, there's no reason not to back it all up.

-troy  
p.s., the above is not my gobbledygook; it's something I picked up on
debian-user or vox-tech.





More information about the talk mailing list