Double cool -- You found your own answer & posted it too.
One limitation in your technique: If you are running something old (like SimplyMEPIS 3.3.2) as I am, then your packages.txt
will not point to the right vers. of the packages. If, you are, as indeed you
are, working w/ a recent ver. of your distro, then this is not a problem.
I believe the "complete" solution, assuming that the old packages are still available somewhere
, would be to process the output of dpkg -l
to create a custom apt-get install
If I want to view my package list, this works:
COLUMNS=168 dpkg -l | less -SN#39
The "168" & the "39" are empirical -- "168" makes sure the display is wide enough to see all the name & ver. info., "39" makes nice hor. scrolling in less
. YMMV. The "COLUMNS=" is only necessary if you are viewing the output; if you redirect to a file, the formatting is taken care of for you. For example:
dpkg -l > dpkg-l.txt
less -S dpkg-l.txt
No info. is lost.
As far as my out of date install is concerned, I plan to upgrade to 6.5 in the near future. It's easier than trying to write that script.
The other approach I have heard suggested, is to never clear your apt cache; in fact, the suggestion was to actively archive it. That way you can copy them (the .debs) to the clone & install them fresh.