Re: dpkg database rebuild
Matej Cepl wrote:
> Ritesh Raj Sarraf wrote:
>> If I copy the whole filesystem to another hard drive and rebuild the dpkg
>> database, will it work ? Will dpkg be able to understand all the packages
>> installed ?
> What about
> dpkg --get-selections
> dpkg --set-selections
> RTFM, dpkg(1)
> Or you can use (which is my preferred way):
> aptitude search '~i !~M' | tr -s ' ' | cut -f 2 -d ' ' > installed.txt
> Then simple editing of installed.txt will make you script to install the
> same packages on new computer.
Cute, but why is it "preferred"? The dpkg method (which I've used) is