Thanks Derek, that was exactly what I was looking for! And the Perl script
saved me a lot of work, that made my day!

> The file you want is /var/lib/dpkg/status (or failing that status-old
> which is the previous version).
>
> It's a text file divided into sections by blank lines. Each section should
> start with a 'Package:' line naming the package and then shold contain a
> 'Status:' line like 'Status: install ok installed' (or 'Status: purge ok
> not-installed', etc).
>
> Manual editing could take ages, so I'd use a scripting language to
> generate a series of installation commands. e.g.
>
> perl -ne 'if(/^Package: (.+)$/){$p=$1};if(/^Status: (.+)
> installed$/){print qq{apt-get install },$p,qq{\n};}' </var/lib/dpkg/status
>
> Of course, you could just take it as an opportunity to only install
> packages you want.

That was the purpose of my question from the beginning. D-I installs tons
of packages that other packages depend on, so it is really difficult to
sort out what is needed and what not.

Regards, Richard



-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to