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

Re: Install matching set of software while preserving aptitude auto/manual install info



On Wed, Nov 05, 2008 at 12:11:55 -0500, Brian McKee wrote:
> Hi All,
> 
> I'd like to 'clone' the installed software on a machine.   I can find
> lots of references to this procedure
> > Backup installed package list on current machine
> > dpkg --get-selections > selections.txt
> > move selections.txt to the new machine Set package list on new machine and install packages
> > dpkg --set-selections < selections.txt
> > apt-get update
> > apt-get upgrade
> 
> What I can't find, but I know I've seen, is a way to do it using
> aptitude that preserves aptitude's knowledge of what was installed
> manually vs automatically.
> Can someone throw me a link (or a cluestick)

You can save a list of the automatically installed packages on the
original system like this:

aptitude -F '%p' search '~M' > auto-list.txt

Once you have installed the same packages on the cloned system, you can
do this:

aptitude unmarkauto '~i'

aptitude markauto $(cat auto-list.txt)

(I never tried this myself, but I think it should work.)

-- 
Regards,            | http://users.icfo.es/Florian.Kulzer
          Florian   |


Reply to: