[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Backup Package names currently installed

On Wed, Oct 29, 2003 at 04:05:10PM +0100, Michael Dominok wrote:
> On Wed, 2003-10-29 at 10:12, Michael Dominok wrote:
> > dpkg -l |grep --extended-regexp --regexp='^[uirph]c|^[uirph]i'|awk {'
> > print $2 "=" $3'} >/tmp/p_list
> I have to correct myself. Just noticed that packages with long names
> could get chopped this way.

Prepend the above command with something like 'COLUMNS=200 ' to see full package

> A better way of getting a p_list:
> cat /var/lib/dpkg/available |grep --extended-regexp '^Package' |awk
> {'print $2'} >/tmp/p_only
> cat /var/lib/dpkg/available |grep --extended-regexp '^Version' |awk
> {'print $2'} >/tmp/v_only
> paste -d'=' /tmp/p_only /tmp/v_only >/tmp/p_list

For me, this p_list now includes packages that I have deinstalled, and
dpkg --get-selections shows them as deinstalled. I believe if you use
this p_list you may try to install *all* available packages found in
your sources.list rather than just the packages you have installed

> Michael


Reply to: