Re: apt: exporting and importing list of installed packages
> > Is there a way to dump my current selection to a file and read it back
> > later? I didn't find such an option in aptitude or any of the other
> > tools.
> >
>
> I use this:
>
> grep -E "^Package|Status:.+$" /var/lib/dpkg/status | \
> sed "s/Package:/\tPackage:/" | tr \\n \\t | sed "s/\t\t/\n/g" | \
> grep "install ok installed" | \
> sed "s/Package: \(.*\)\tStatus: install ok installed/\1/" | sort
Even easier, run
dpkg --get-selections > <filename>
run
dpkg --set-selections < <filename>
to get it back.
Paul
Reply to: