{"id":9242,"date":"2022-08-08T13:31:48","date_gmt":"2022-08-08T18:31:48","guid":{"rendered":"https:\/\/www.rushworth.us\/lisa\/?p=9242"},"modified":"2022-08-12T13:32:32","modified_gmt":"2022-08-12T18:32:32","slug":"useful-dnf-commands","status":"publish","type":"post","link":"https:\/\/www.rushworth.us\/lisa\/?p=9242","title":{"rendered":"Useful DNF Commands"},"content":{"rendered":"<p>Beyond basic stuff like &#8220;dnf install somepackage&#8221; or downloading an rpm and using &#8220;dnf install my.package.rpm&#8221;, this is a running list of useful dnf commands.<\/p>\n<p>List installed packages (similar to rpm -qa):<\/p>\n<p><tt>dnf list installed<\/tt><\/p>\n<p>List packages with updates available:<\/p>\n<p><tt>dnf check-update<\/tt><\/p>\n<p>Update everything <em>but<\/em> the kernel:<br \/>\n<tt>dnf update -x kernel*<\/tt><\/p>\n<p>Find package that provides something:<\/p>\n<pre>[lisa@rhel1 ~\/]# <strong>dnf whatprovides cdrskin<\/strong>\r\nLast metadata expiration check: 2:35:57 ago on Fri 12 Aug 2022 11:37:43 AM EDT.\r\ncdrskin-1.5.2-2.fc32.x86_64 : Limited cdrecord compatibility wrapper to ease migration to libburn\r\nRepo : fedora\r\nMatched from:\r\nProvide : cdrskin = 1.5.2-2.fc32\r\n\r\ncdrskin-1.5.4-2.fc32.x86_64 : Limited cdrecord compatibility wrapper to ease migration to libburn\r\nRepo : updates\r\nMatched from:\r\nProvide : cdrskin = 1.5.4-2.fc32<\/pre>\n<p>Package info, including version<\/p>\n<pre>[lisa@rhel1 ~\/]# <strong>dnf info sendmail<\/strong>\r\nLast metadata expiration check: 2:37:19 ago on Fri 12 Aug 2022 11:37:43 AM EDT.\r\nAvailable Packages\r\nName : sendmail\r\nVersion : 8.15.2\r\nRelease : 43.fc32\r\nArchitecture : x86_64\r\nSize : 730 k\r\nSource : sendmail-8.15.2-43.fc32.src.rpm\r\nRepository : fedora\r\nSummary : A widely used Mail Transport Agent (MTA)\r\nURL : http:\/\/www.sendmail.org\/\r\nLicense : Sendmail\r\nDescription : The Sendmail program is a very widely used Mail Transport Agent (MTA).\r\n: MTAs send mail from one machine to another. Sendmail is not a client\r\n: program, which you use to read your email. Sendmail is a\r\n: behind-the-scenes program which actually moves your email over\r\n: networks or the Internet to where you want it to go.\r\n:\r\n: If you ever need to reconfigure Sendmail, you will also need to have\r\n: the sendmail-cf package installed. If you need documentation on\r\n: Sendmail, you can install the sendmail-doc package.<\/pre>\n<p>Show history:<\/p>\n<pre>[lisa@rhel1 ~\/]# <strong>dnf history<\/strong>\r\nID     | Command line                                                                                                      | Date and time    | Action(s)      | Altered\r\n------------------------------------------------------------------------------------------------------------------------------------------------------------------------\r\n   102 | remove liberation-fonts                                                                                           | 2021-11-28 18:44 | Removed        |    3\r\n   101 | remove chromedriver                                                                                               | 2021-11-28 18:44 | Removed        |    2\r\n   100 | remove google-chrome-stable                                                                                       | 2021-11-28 18:44 | Removed        |    1  &lt; 99 | install liberation-fonts | 2021-11-28 18:42 | Install | 1 &gt;\r\n    98 | install chromedriver                                                                                              | 2021-11-28 18:38 | Install        |    2\r\n    97 | remove mediainfo                                                                                                  | 2021-11-16 13:31 | Removed        |    4\r\n    96 | install mediainfo                                                                                                 | 2021-11-16 13:29 | Install        |    4\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p>Which brings up an interesting command &#8212; you can <em>undo<\/em> a history step instead of trying to uninstall the list of things you just installed.<\/p>\n<p><tt>dnf history undo 98 -y<\/tt><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Beyond basic stuff like &#8220;dnf install somepackage&#8221; or downloading an rpm and using &#8220;dnf install my.package.rpm&#8221;, this is a running list of useful dnf commands. List installed packages (similar to rpm -qa): dnf list installed List packages with updates available: dnf check-update Update everything but the kernel: dnf update -x kernel* Find package that provides &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[30],"tags":[1415,47,785],"class_list":["post-9242","post","type-post","status-publish","format-standard","hentry","category-system-administration","tag-dnf","tag-fedora","tag-rhel"],"_links":{"self":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts\/9242","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=9242"}],"version-history":[{"count":1,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts\/9242\/revisions"}],"predecessor-version":[{"id":9243,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts\/9242\/revisions\/9243"}],"wp:attachment":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=9242"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=9242"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=9242"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}