Re: dselect problems too much of what I don't want, nothing of what I need
Craig Sampson wrote:
> At this point, what I really need to do is to somehow rebuild
> the dselect database so that it can start afresh (if you like)
> with only those packages that are actually installed.
perl -i.bak -pe 'if (/^Status: [^\s]+ ([^\s]+) ([^\s]+)/) { $_="Status: ".($2 eq "installed" ? "install" : "purge")." $1 $2\n"}' /var/lib/dpkg/status
Not particulary tested, but it keeps a status.bak if it should go
horribly wrong.
--
see shy jo
Reply to: