{"id":1361,"date":"2019-02-04T08:28:24","date_gmt":"2019-02-04T02:58:24","guid":{"rendered":"http:\/\/jaipurhosting.com\/blog\/?p=1361"},"modified":"2019-02-13T18:03:38","modified_gmt":"2019-02-13T12:33:38","slug":"how-to-undo-or-redo-a-yum-install-on-centos-and-rhel","status":"publish","type":"post","link":"https:\/\/www.jaipurhosting.com\/blog\/how-to-undo-or-redo-a-yum-install-on-centos-and-rhel\/","title":{"rendered":"How to Undo or Redo a Yum Install on CentOS and RHEL"},"content":{"rendered":"\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p class=\"has-medium-font-size\"><strong>Description<\/strong><\/p>\n\n\n\n<p><strong> <\/strong>One of the most important and useful feature added to YUM Package Manager (from version 3.2.25) is the \u2018yum history\u2019 command. <\/p>\n\n\n\n<p>It allows you to review a full history of yum transactions that have been run on a system.<\/p>\n\n\n\n<p>It shows the dates and times when a transactions were performed, whether the transactions succeeded or were aborted, the number of packages affected, and so much more.<\/p>\n\n\n\n<p>Importantly, yum history can be used to undo or redo certain transactions. <\/p>\n\n\n\n<p>In this article, we will show how to undo or redo a yum install including dependencies on a CentOS\/RHEL distribution.<\/p>\n\n\n\n<p>To do this, first you need to review the yum transactions history by running the following command as root user, otherwise use the <a href=\"http:\/\/jaipurhosting.com\/blog\/how-to-run-sudo-command-without-entering-a-password-in-linux\/\">sudo command<\/a> to gain root privileges.<\/p>\n\n\n\n<p><strong><em>$ sudo yum history  <br><\/em><\/strong> OR<br><strong><em>$ sudo yum history list all<\/em><\/strong><\/p>\n\n\n\n<p>The yum history shows you the transaction ID, the command line, date and time, action and more.<\/p>\n\n\n\n<p>To undo a yum install, take note of the transaction ID, and perform the required action. <\/p>\n\n\n\n<p>In this example, we want to undo the install with ID (), which will erase the package that was installed in the specified transaction, as follows (enter y\/yes when asked).<\/p>\n\n\n\n<p><strong><em>$ sudo yum history undo (ID)<\/em><\/strong><\/p>\n\n\n\n<p>To redo a yum install, as before, take note of the transaction ID, and run it. For instance to redo the install with ID 63, run the the following command.<\/p>\n\n\n\n<p><strong><em>$ sudo yum history redo (ID)<\/em><\/strong><\/p>\n\n\n\n<p>Note that you can do the same for a yum remove\/erase transaction. The most important thing to note is the transaction ID of an yum install or yum remove action.<\/p>\n\n\n\n<p>We hope you\u2019ve found this useful!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Description One of the most important and useful feature added to YUM Package Manager (from version 3.2.25) is the \u2018yum history\u2019 command. It allows you to review a full history of yum transactions that have been run on a system. It shows the dates and times when a transactions were performed, whether the transactions succeeded [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1362,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1361","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-categorized"],"_links":{"self":[{"href":"https:\/\/www.jaipurhosting.com\/blog\/wp-json\/wp\/v2\/posts\/1361","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.jaipurhosting.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.jaipurhosting.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.jaipurhosting.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.jaipurhosting.com\/blog\/wp-json\/wp\/v2\/comments?post=1361"}],"version-history":[{"count":3,"href":"https:\/\/www.jaipurhosting.com\/blog\/wp-json\/wp\/v2\/posts\/1361\/revisions"}],"predecessor-version":[{"id":1367,"href":"https:\/\/www.jaipurhosting.com\/blog\/wp-json\/wp\/v2\/posts\/1361\/revisions\/1367"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.jaipurhosting.com\/blog\/wp-json\/wp\/v2\/media\/1362"}],"wp:attachment":[{"href":"https:\/\/www.jaipurhosting.com\/blog\/wp-json\/wp\/v2\/media?parent=1361"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.jaipurhosting.com\/blog\/wp-json\/wp\/v2\/categories?post=1361"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.jaipurhosting.com\/blog\/wp-json\/wp\/v2\/tags?post=1361"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}