{"id":884,"date":"2014-08-09T11:24:16","date_gmt":"2014-08-09T19:24:16","guid":{"rendered":"http:\/\/systemsolver.com\/StatlerBlog\/?p=884"},"modified":"2014-08-09T11:24:16","modified_gmt":"2014-08-09T19:24:16","slug":"linux-list-installed-packages-and-install-from-list","status":"publish","type":"post","link":"https:\/\/systemsolver.goodhealthyday.com\/StatlerBlog\/2014\/08\/09\/linux-list-installed-packages-and-install-from-list\/","title":{"rendered":"Linux list installed packages and install from list"},"content":{"rendered":"<p>The goal is to make a list of manually installed packages, then be able to install that list on another Linux computer.<\/p>\n<p><a href=\"http:\/\/superuser.com\/questions\/132614\/how-to-list-manually-installed-software-packages-in-ubuntu\">http:\/\/superuser.com\/questions\/132614\/how-to-list-manually-installed-software-packages-in-ubuntu<\/a><\/p>\n<p style=\"padding-left: 30px;\">aptitude can do what are you looking for and much more, actually.<\/p>\n<p style=\"padding-left: 60px;\"><em>aptitude search &#8216;?installed ?not(?automatic)&#8217;<\/em><\/p>\n<p style=\"padding-left: 30px;\">Or shorter:<\/p>\n<p style=\"padding-left: 60px;\"><em>aptitude search &#8216;~i!~M&#8217;<\/em><\/p>\n<p style=\"padding-left: 30px;\">will list all the packages installed manually. None of the dependent (i.e., like mysql-data, or *-common, that are installed automatically) packages will be listed.<\/p>\n<p style=\"padding-left: 30px;\">If you want just package names, use -F &#8216;%p&#8217; parameter.<\/p>\n<p style=\"padding-left: 30px;\">You can check out <a href=\"http:\/\/algebraicthunk.net\/~dburrows\/projects\/aptitude\/doc\/en\/ch02s03s05.html\">search patterns reference<\/a>, there&#8217;s virtually no criteria it can&#8217;t search for.<\/p>\n<p>&nbsp;<\/p>\n<p>Now to take that command and output it to a file<\/p>\n<p style=\"padding-left: 30px;\"><em> aptitude search &#8216;~i!~M&#8217; &gt;\u00a0 &gt; ~\/installed-software.log<\/em><\/p>\n<p>Then use that to install the same software to a new machine<\/p>\n<p style=\"padding-left: 30px;\"><em>aptitude install $(cat ~\/installed-software.log | awk &#8216;{print $1}&#8217;)<\/em><\/p>\n<p>Another way to install is this<\/p>\n<p style=\"padding-left: 30px;\"><em><code>sudo dpkg --set-selections &lt; ~\/packages &amp;&amp; apt-get dselect-upgrade<\/code><\/em><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>For a basic overview of Linux package commands:<\/p>\n<p><a href=\"http:\/\/www.cyberciti.biz\/tips\/linux-debian-package-management-cheat-sheet.html\">http:\/\/www.cyberciti.biz\/tips\/linux-debian-package-management-cheat-sheet.html<\/a><\/p>\n<p>And more extensive reading\/commands discussion<\/p>\n<p><a href=\"http:\/\/askubuntu.com\/questions\/17823\/how-to-list-all-installed-packages\">http:\/\/askubuntu.com\/questions\/17823\/how-to-list-all-installed-packages<\/a><\/p>\n<p>For a more extreme package report\/install system see<\/p>\n<p><a href=\"http:\/\/devstructure.com\/blueprint\/\">http:\/\/devstructure.com\/blueprint\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The goal is to make a list of manually installed packages, then be able to install that list on another Linux computer. http:\/\/superuser.com\/questions\/132614\/how-to-list-manually-installed-software-packages-in-ubuntu aptitude can do what are you looking for and much more, actually. aptitude search &#8216;?installed ?not(?automatic)&#8217; Or shorter: aptitude search &#8216;~i!~M&#8217; will list all the packages installed manually. None of the dependent [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[],"class_list":["post-884","post","type-post","status-publish","format-standard","hentry","category-linux"],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/systemsolver.goodhealthyday.com\/StatlerBlog\/wp-json\/wp\/v2\/posts\/884","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/systemsolver.goodhealthyday.com\/StatlerBlog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/systemsolver.goodhealthyday.com\/StatlerBlog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/systemsolver.goodhealthyday.com\/StatlerBlog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/systemsolver.goodhealthyday.com\/StatlerBlog\/wp-json\/wp\/v2\/comments?post=884"}],"version-history":[{"count":0,"href":"https:\/\/systemsolver.goodhealthyday.com\/StatlerBlog\/wp-json\/wp\/v2\/posts\/884\/revisions"}],"wp:attachment":[{"href":"https:\/\/systemsolver.goodhealthyday.com\/StatlerBlog\/wp-json\/wp\/v2\/media?parent=884"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/systemsolver.goodhealthyday.com\/StatlerBlog\/wp-json\/wp\/v2\/categories?post=884"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/systemsolver.goodhealthyday.com\/StatlerBlog\/wp-json\/wp\/v2\/tags?post=884"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}