Okay. I guess it could be a new idea. (Update)
Here is my method of Madness.
Build a "server" with nothing on it cept base, ssh and a couple other connectivity packages.
I export that list, via:
dkpg --get-selections > /root/archive/base-server.pkg.listI then always have a list of packages to go back to. Sometimes I use it sometimes I don't. But I can always go back to base, without worry.
Now, using
aptitude just like
apt-get, I install everything I typically need for the server stuff I am testing. Ubuntu has nearly everything Debian has (barring a few things that are extreme fringe stuff) so I test a setup. If I blow it up and it'd be more work to "fix" than to purge and re-install...
I grab the currently installed list, cat both lists, sort it, then uniq
cat /root/archive/base-server.pkg.list current.pkg.list | \\\n sed -e s/\\\\t/_\\\\t/g | cut -f1 | sort | \\\n uniq -u | xargs aptitude install
Adding an underscore(
_) to the package name does a purge of the package and config files
Adding a minus sign (
-) to the packagename does a remove without purge.
Also, any packages automatically installed by aptitude that were reccomended (they should be in the list to remove anyway) will be removed also.
Basically, from then on it is a "Lather, Rinse, Repeat" kinfd of operation. The only things that change using the "dev" branch of Ubuntu package names and package layouts vary widely depending on the activity in the dev branch. Currently that is Dapper.
Same thing can and has been done on my Debian machines when re-deploying them.
Update: I changed something in my bash environment... That "cat" statement doesn't work on Ubuntu anymore. But, good ole bash ordered execution works it pretty good.
aptitude install $(cat /root/archive/base-server.pkg.list current.pkg.list | \\\n sed -e s/\\\\t/_\\\\t/g | cut -f1 | sort | uniq -u | xargs)
That should work good on older setups as well, mainly because I regressed backwards on the compatibility making it "more" posix compliant... though not completely
--
[link|mailto:greg@gregfolkert.net|greg],
[link|http://www.iwethey.org/ed_curry|REMEMBER ED CURRY!] @
iwetheyFreedom is not FREE.
Yeah, but 10s of Trillions of US Dollars?
SELECT * FROM scog WHERE ethics > 0;
0 rows returned.