How to install same packages on another ubuntu 12.04 server

There is a lot of stuff out there about this, but none of them worked for me as well as this. The difference is that the deborphan command pretty much just lists the packages you actually installed, not the stuff that got installed as a dependency.

On your old machine:

apt-get install deborphan
(Edit: parameters were backwards)
deborphan -a --no-show-section > installedpackages
deborphan --no-show-section -a > installedpackages

copy the installedpackages file to new machine

you might want to check your ppa’s and sources.list if the next commands show missing packages.

On your new machine

aptitude update
aptitude install $(cat installedpackages)

This entry was posted in Linux, Ubuntu. Bookmark the permalink.

Comments are closed.