Cloning packages from one Ubuntu install to another

Right now I’m busy transferring an Ubuntu install from a physical to a virtual machine. One of the issues is to get all the relevant packages installed. The following commands do just this.

  1. Make a list of the packages on the donor system:
  2. Copy the package list from the donor to the virtual system.
  3. Login to the virtual system, and tell dpkg which packages should be installed:
  4. And install the packages:

Just press Y, and all the missing packages will be installed on the virtual system. This is why I love a package manager! Note that this will probably work on any Debian based Linux distribution.

Posted in General, interesting

Leave a Reply

Your email address will not be published. Required fields are marked *

To create code blocks or other preformatted text, indent by four spaces:

    This will be displayed in a monospaced font. The first four 
    spaces will be stripped off, but all other whitespace
    will be preserved.
    Markdown is turned off in code blocks:
     [This is not a link](

To create not a block, but an inline code span, use backticks:

Here is some inline `code`.

For more help see