{"id":55,"date":"2011-09-28T00:22:42","date_gmt":"2011-09-28T00:22:42","guid":{"rendered":"http:\/\/info.ffteixeira.net\/2011\/09\/28\/list-installed-do-reinstallation-restore-software\/"},"modified":"2011-09-28T00:22:42","modified_gmt":"2011-09-28T00:22:42","slug":"list-installed-do-reinstallation-restore-software","status":"publish","type":"post","link":"https:\/\/blog.ffteixeira.net\/?p=55","title":{"rendered":"List installed, do reinstallation\/restore software"},"content":{"rendered":"<div class=\"format_text entry-content\" style=\"font-size: 1.4em;line-height: 1.571em;padding: 0px;margin: 0px\">\n<div style=\"margin-top: 0px;margin-right: 0px;margin-bottom: 0px;margin-left: 5px;float: right;padding: 0px\"><a title=\"See all GNU\/Linux related tips\/articles\" href=\"http:\/\/www.cyberciti.biz\/tips\/category\/linux\"><br \/>\n<img decoding=\"async\" style=\"border-width: initial;border-color: initial;border-style: none;padding: 0px;margin: 0px\" src=\"http:\/\/files.cyberciti.biz\/cbzcache\/3rdparty\/linux-logo.png\" alt=\"\" border=\"0\" \/><\/a><\/div>\n<p style=\"margin-top: 0px;margin-right: 0px;margin-bottom: 1.571em;margin-left: 0px;padding: 0px\">Hardware and Software failures are part of Life. That is why you need to have a backup. I have already written about\u00a0<a href=\"http:\/\/www.cyberciti.biz\/tips\/how-to-backup-mysql-databases-web-server-files-to-a-ftp-server-automatically.html\">backing files and MySQL<\/a>databases. You need not to backup all installed binaries (mostly software) with following tips. It will not just save your time but both Debian and RHEL distro can update them instantly.<\/p>\n<p style=\"margin-top: 0px;margin-right: 0px;margin-bottom: 1.571em;margin-left: 0px;padding: 0px\">In order to reinstall or restore your installed software you need to have a list of all installed software.<br \/>\n<!--more--><\/p>\n<div class=\"format_text entry-content\" style=\"font-size: 1.4em;line-height: 1.571em;padding: 0px;margin: 0px\">\n<div style=\"margin-top: 0px;margin-right: 0px;margin-bottom: 0px;margin-left: 5px;float: right;padding: 0px\"><a title=\"See all GNU\/Linux related tips\/articles\" href=\"http:\/\/www.cyberciti.biz\/tips\/category\/linux\"><br \/>\n<img decoding=\"async\" style=\"border-width: initial;border-color: initial;border-style: none;padding: 0px;margin: 0px\" src=\"http:\/\/files.cyberciti.biz\/cbzcache\/3rdparty\/linux-logo.png\" alt=\"\" border=\"0\" \/><\/a><\/div>\n<p style=\"margin-top: 0px;margin-right: 0px;margin-bottom: 1.571em;margin-left: 0px;padding: 0px\">Hardware and Software failures are part of Life. That is why you need to have a backup. I have already written about\u00a0<a href=\"http:\/\/www.cyberciti.biz\/tips\/how-to-backup-mysql-databases-web-server-files-to-a-ftp-server-automatically.html\">backing files and MySQL<\/a>databases. You need not to backup all installed binaries (mostly software) with following tips. It will not just save your time but both Debian and RHEL distro can update them instantly.<\/p>\n<p style=\"margin-top: 0px;margin-right: 0px;margin-bottom: 1.571em;margin-left: 0px;padding: 0px\">In order to reinstall or restore your installed software you need to have a list of all installed software.<!--more--><\/p>\n<h3 style=\"margin-top: 1.833em;margin-right: 0px;margin-bottom: 0.611em;margin-left: 0px;font-weight: normal;font-size: 1.286em;line-height: 1.222em;padding: 0px\">Task: Backup list of installed software<\/h3>\n<p style=\"margin-top: 0px;margin-right: 0px;margin-bottom: 1.571em;margin-left: 0px;padding: 0px\"><strong style=\"padding: 0px;margin: 0px\">Debian Linux<\/strong><br style=\"padding: 0px;margin: 0px\" \/>If you are using Debian Linux use dpkg command to list installed software:<br style=\"padding: 0px;margin: 0px\" \/><code style=\"padding-top: 0.667em;padding-right: 0.917em;padding-bottom: 0.667em;padding-left: 0.917em;margin-top: 0px;margin-right: 0px;margin-bottom: 1.833em;margin-left: 0px;line-height: 1.5em;background-image: none;background-attachment: scroll;background-color: #eeeeee;font-family: Consolas, 'Andale Mono', Monaco, Courier, 'Courier New', Verdana, sans-serif;font-size: 0.857em;background-position: 0px 0px;border-width: 1px;border-color: #dddddd;border-style: solid\">$ dpkg --get-selections<\/code><\/p>\n<p style=\"margin-top: 0px;margin-right: 0px;margin-bottom: 1.571em;margin-left: 0px;padding: 0px\">Store list of installed software to a file called \/backup\/installed-software.log<br style=\"padding: 0px;margin: 0px\" \/><code style=\"padding-top: 0.667em;padding-right: 0.917em;padding-bottom: 0.667em;padding-left: 0.917em;margin-top: 0px;margin-right: 0px;margin-bottom: 1.833em;margin-left: 0px;line-height: 1.5em;background-image: none;background-attachment: scroll;background-color: #eeeeee;font-family: Consolas, 'Andale Mono', Monaco, Courier, 'Courier New', Verdana, sans-serif;font-size: 0.857em;background-position: 0px 0px;border-width: 1px;border-color: #dddddd;border-style: solid\">$ dpkg --get-selections &gt; \/backup\/installed-software.log<\/code><\/p>\n<p style=\"margin-top: 0px;margin-right: 0px;margin-bottom: 1.571em;margin-left: 0px;padding: 0px\"><strong style=\"padding: 0px;margin: 0px\">RPM based distributions (RHEL, Fedora Core, Cent OS, Suse Linux etc)<\/strong><br style=\"padding: 0px;margin: 0px\" \/>Use rpm command to get list of all installed software:<br style=\"padding: 0px;margin: 0px\" \/><code style=\"padding-top: 0.667em;padding-right: 0.917em;padding-bottom: 0.667em;padding-left: 0.917em;margin-top: 0px;margin-right: 0px;margin-bottom: 1.833em;margin-left: 0px;line-height: 1.5em;background-image: none;background-attachment: scroll;background-color: #eeeeee;font-family: Consolas, 'Andale Mono', Monaco, Courier, 'Courier New', Verdana, sans-serif;font-size: 0.857em;background-position: 0px 0px;border-width: 1px;border-color: #dddddd;border-style: solid\">$ rpm -qa<\/code><br style=\"padding: 0px;margin: 0px\" \/>OR<br style=\"padding: 0px;margin: 0px\" \/><code style=\"padding-top: 0.667em;padding-right: 0.917em;padding-bottom: 0.667em;padding-left: 0.917em;margin-top: 0px;margin-right: 0px;margin-bottom: 1.833em;margin-left: 0px;line-height: 1.5em;background-image: none;background-attachment: scroll;background-color: #eeeeee;font-family: Consolas, 'Andale Mono', Monaco, Courier, 'Courier New', Verdana, sans-serif;font-size: 0.857em;background-position: 0px 0px;border-width: 1px;border-color: #dddddd;border-style: solid\">$ rpm -qa &gt; \/backup\/installed-software.log<\/code><\/p>\n<h3 style=\"margin-top: 1.833em;margin-right: 0px;margin-bottom: 0.611em;margin-left: 0px;font-weight: normal;font-size: 1.286em;line-height: 1.222em;padding: 0px\">Task: Restore installed software from backup list<\/h3>\n<p style=\"margin-top: 0px;margin-right: 0px;margin-bottom: 1.571em;margin-left: 0px;padding: 0px\">Now you have a list of installed software. After installing base system you can immediately install all software.<\/p>\n<p style=\"margin-top: 0px;margin-right: 0px;margin-bottom: 1.571em;margin-left: 0px;padding: 0px\"><strong style=\"padding: 0px;margin: 0px\">Debian Linux<\/strong><br style=\"padding: 0px;margin: 0px\" \/>Debian Linux makes your life easy. All you have to do is type following two commands:<br style=\"padding: 0px;margin: 0px\" \/><code style=\"padding-top: 0.667em;padding-right: 0.917em;padding-bottom: 0.667em;padding-left: 0.917em;margin-top: 0px;margin-right: 0px;margin-bottom: 1.833em;margin-left: 0px;line-height: 1.5em;background-image: none;background-attachment: scroll;background-color: #eeeeee;font-family: Consolas, 'Andale Mono', Monaco, Courier, 'Courier New', Verdana, sans-serif;font-size: 0.857em;background-position: 0px 0px;border-width: 1px;border-color: #dddddd;border-style: solid\"># dpkg --set-selections &lt; \/backup\/installed-software.log<\/code><br style=\"padding: 0px;margin: 0px\" \/>Now your list is imported use dselect or other tools to install the package.<br style=\"padding: 0px;margin: 0px\" \/><code style=\"padding-top: 0.667em;padding-right: 0.917em;padding-bottom: 0.667em;padding-left: 0.917em;margin-top: 0px;margin-right: 0px;margin-bottom: 1.833em;margin-left: 0px;line-height: 1.5em;background-image: none;background-attachment: scroll;background-color: #eeeeee;font-family: Consolas, 'Andale Mono', Monaco, Courier, 'Courier New', Verdana, sans-serif;font-size: 0.857em;background-position: 0px 0px;border-width: 1px;border-color: #dddddd;border-style: solid\"># dselect<\/code><\/p>\n<p style=\"margin-top: 0px;margin-right: 0px;margin-bottom: 1.571em;margin-left: 0px;padding: 0px\">Select &#8216;<strong style=\"padding: 0px;margin: 0px\">i<\/strong>&#8216; for install the software.<\/p>\n<p style=\"margin-top: 0px;margin-right: 0px;margin-bottom: 1.571em;margin-left: 0px;padding: 0px\"><strong style=\"padding: 0px;margin: 0px\">RPM based distro<\/strong><br style=\"padding: 0px;margin: 0px\" \/>As far as I know RPM based distro does not offers dpkg kind of facility. But with little shell scripting technquie you can easily install all software:<br style=\"padding: 0px;margin: 0px\" \/><code style=\"padding-top: 0.667em;padding-right: 0.917em;padding-bottom: 0.667em;padding-left: 0.917em;margin-top: 0px;margin-right: 0px;margin-bottom: 1.833em;margin-left: 0px;line-height: 1.5em;background-image: none;background-attachment: scroll;background-color: #eeeeee;font-family: Consolas, 'Andale Mono', Monaco, Courier, 'Courier New', Verdana, sans-serif;font-size: 0.857em;background-position: 0px 0px;border-width: 1px;border-color: #dddddd;border-style: solid\"># LIST=\"$( cat \/backup\/installed-software.log )\"<\/code><\/p>\n<p style=\"margin-top: 0px;margin-right: 0px;margin-bottom: 1.571em;margin-left: 0px;padding: 0px\">If you are using yum, type the following for loop to install all software:<br style=\"padding: 0px;margin: 0px\" \/><code style=\"padding-top: 0.667em;padding-right: 0.917em;padding-bottom: 0.667em;padding-left: 0.917em;margin-top: 0px;margin-right: 0px;margin-bottom: 1.833em;margin-left: 0px;line-height: 1.5em;background-image: none;background-attachment: scroll;background-color: #eeeeee;font-family: Consolas, 'Andale Mono', Monaco, Courier, 'Courier New', Verdana, sans-serif;font-size: 0.857em;background-position: 0px 0px;border-width: 1px;border-color: #dddddd;border-style: solid\"># for s in $LIST; do yum install $s; done<\/code><br style=\"padding: 0px;margin: 0px\" \/><em style=\"padding: 0px;margin: 0px\"><strong style=\"padding: 0px;margin: 0px\">Update\u00a0<\/strong><\/em>try out following command (thanks to gt):<br style=\"padding: 0px;margin: 0px\" \/><code style=\"padding-top: 0.667em;padding-right: 0.917em;padding-bottom: 0.667em;padding-left: 0.917em;margin-top: 0px;margin-right: 0px;margin-bottom: 1.833em;margin-left: 0px;line-height: 1.5em;background-image: none;background-attachment: scroll;background-color: #eeeeee;font-family: Consolas, 'Andale Mono', Monaco, Courier, 'Courier New', Verdana, sans-serif;font-size: 0.857em;background-position: 0px 0px;border-width: 1px;border-color: #dddddd;border-style: solid\"># yum -y install $(cat \/backup\/installed-software.log)<\/code><\/p>\n<p style=\"margin-top: 0px;margin-right: 0px;margin-bottom: 1.571em;margin-left: 0px;padding: 0px\">OR if you are using RHEL (RHN subscriber) :<br style=\"padding: 0px;margin: 0px\" \/><code style=\"padding-top: 0.667em;padding-right: 0.917em;padding-bottom: 0.667em;padding-left: 0.917em;margin-top: 0px;margin-right: 0px;margin-bottom: 1.833em;margin-left: 0px;line-height: 1.5em;background-image: none;background-attachment: scroll;background-color: #eeeeee;font-family: Consolas, 'Andale Mono', Monaco, Courier, 'Courier New', Verdana, sans-serif;font-size: 0.857em;background-position: 0px 0px;border-width: 1px;border-color: #dddddd;border-style: solid\"># for s in $LIST; do up2date -i $s; done<\/code><\/p>\n<p style=\"margin-top: 0px;margin-right: 0px;margin-bottom: 1.571em;margin-left: 0px;padding: 0px\">Alternatively you use following command:<br style=\"padding: 0px;margin: 0px\" \/><code style=\"padding-top: 0.667em;padding-right: 0.917em;padding-bottom: 0.667em;padding-left: 0.917em;margin-top: 0px;margin-right: 0px;margin-bottom: 1.833em;margin-left: 0px;line-height: 1.5em;background-image: none;background-attachment: scroll;background-color: #eeeeee;font-family: Consolas, 'Andale Mono', Monaco, Courier, 'Courier New', Verdana, sans-serif;font-size: 0.857em;background-position: 0px 0px;border-width: 1px;border-color: #dddddd;border-style: solid\"># up2date -i $(cat \/backup\/installed-software.log)<\/code><\/p>\n<p><span style=\"line-height: 30px\">Powerd by\u00a0<\/span><a href=\"http:\/\/www.cyberciti.biz\/tips\/linux-get-list-installed-software-reinstallation-restore.html\"><span style=\"color: #000000\"><span style=\"line-height: 30px\">http:\/\/www.cyberciti.biz\/tips\/linux-get-list-installed-software-reinstallation-restore.html<\/span><\/span><\/a><\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Hardware and Software failures are part of Life. That is why you need to have a backup. I have already written about\u00a0backing files and MySQLdatabases. You need not to backup all installed binaries (mostly software) with following tips. It will &hellip; <a href=\"https:\/\/blog.ffteixeira.net\/?p=55\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-55","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/blog.ffteixeira.net\/index.php?rest_route=\/wp\/v2\/posts\/55","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.ffteixeira.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.ffteixeira.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.ffteixeira.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.ffteixeira.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=55"}],"version-history":[{"count":0,"href":"https:\/\/blog.ffteixeira.net\/index.php?rest_route=\/wp\/v2\/posts\/55\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.ffteixeira.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=55"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.ffteixeira.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=55"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.ffteixeira.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=55"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}