How to create a snapshot of current ubuntu installed programs, so that I can copy it to another fresh installation of ubuntu?

1

I have some installed programs on Ubuntu on my remote server (which I have root access to it). Now I need to install a fresh Ubuntu on some other machine/server, and I don't want to go through installing all these programs and dependencies again(mysql, rails, rvm, nginx, etc...). So is there a way to capture current state of Ubuntu programs and configurations and copy it to another Ubuntu installation ?

Loai Ghoraba

Posted 2016-04-16T21:06:05.637

Reputation: 119

1

An easy question if you just google http://ubuntuforums.org/showthread.php?t=1881926

– SeanClt – 2016-04-16T21:13:49.117

Thanks for the link, but this works with local machine, however I couldn't do it with my remote server (which I have root access on it), so any way to do this with remote server without GUI ? Just from terminal? – Loai Ghoraba – 2016-04-17T04:39:23.770

The link from ubuntuforums.org in the above comment has the same dpkg command as your answer... A search of stackexchange would have found this too http://askubuntu.com/questions/17823/how-to-list-all-installed-packages

– Xen2050 – 2016-04-17T21:17:36.940

Answers

0

Well, I found this link which exactly solves my problem :)

http://eggsonbread.com/2010/01/28/move-ubuntu-to-another-computer-in-3-simple-steps/

Loai Ghoraba

Posted 2016-04-16T21:06:05.637

Reputation: 119

Thanks for closing the loop on your question. Super User's purpose is to build a knowledge base here rather than a collection of links to answers elsewhere; external links often break, in which case the answer would not be useful. Please include the essential information within your answer and use the link for attribution and reference. Just a heads up, link-only answers tend to attract downvotes and are often deleted. BTW, in another day, you will be able to accept your answer to indicate that the problem has been solved. – fixer1234 – 2016-04-17T17:31:53.613

This method, using dpkg --get-selections will list every single package installed, default ones, libraries, everything. They may not match exactly a freshly installed system, and forcibly downgrading packages could be unpredictable at best – Xen2050 – 2016-04-17T21:08:24.217