{"id":28,"date":"2007-02-16T13:38:43","date_gmt":"2007-02-16T21:38:43","guid":{"rendered":"http:\/\/jim-zimmerman.com\/blog\/?p=28"},"modified":"2015-11-05T16:28:13","modified_gmt":"2015-11-05T23:28:13","slug":"fedoracentosredhat-enterprise-linux-yum-hangs","status":"publish","type":"post","link":"https:\/\/jim-zimmerman.com\/?p=28","title":{"rendered":"Fedora\/CentOS\/Redhat Enterprise Linux &#8211; yum hangs"},"content":{"rendered":"<p>Here is the procedure I have used to fix yum when it hangs.  Usually, I will find one or more of the following kinds of rpm processes &#8220;running&#8221;:<\/p>\n<p># ps -ef | grep rpm<br \/>\nroot     27265 26840  0 Feb05 ?        00:00:00 awk -v progname=\/etc\/cron.daily\/rpm progname {?????   print progname &#8220;:\\n&#8221;?????   progname=&#8221;&#8221;;????       }????       { print; }<\/p>\n<p>The first thing I do is cancel or kill my yum processes.  Then, I kill all the running rpm processes using the following:<\/p>\n<p># killall -9 -r &#8220;.*rpmq.*&#8221;<\/p>\n<p>Next, I remove all the __ files in the \/var\/lib\/rpm directory:<\/p>\n<p># cd \/var\/lib\/rpm<br \/>\n# ls<br \/>\nBasenames     __db.000  __db.002  Dirnames  Group       Name      Providename     Pubkeys      Requireversion  Sigmd5<br \/>\nConflictname  __db.001  __db.003  Filemd5s  Installtid  Packages  Provideversion  Requirename  Sha1header      Triggername<br \/>\n# rm _*<br \/>\nrm: remove regular empty file `__db.000&#8242;? y<br \/>\nrm: remove regular file `__db.001&#8242;? y<br \/>\nrm: remove regular file `__db.002&#8242;? y<br \/>\nrm: remove regular file `__db.003&#8242;? y<\/p>\n<p>Then, rebuild the rpm database:<\/p>\n<p># rpm &#8211;rebuilddb<\/p>\n<p>I usually clean out the yum cache files by running the following:<\/p>\n<p># yum clean all<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Here is the procedure I have used to fix yum when it hangs. Usually, I will find one or more of the following kinds of rpm processes &#8220;running&#8221;: # ps -ef | grep rpm root 27265 26840 0 Feb05 ? 00:00:00 awk -v progname=\/etc\/cron.daily\/rpm progname {????? print progname &#8220;:\\n&#8221;????? progname=&#8221;&#8221;;???? }???? { print; } The [&#038;hellip<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-28","post","type-post","status-publish","format-standard","hentry","category-documentation"],"share_on_mastodon":{"url":"","error":""},"_links":{"self":[{"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=\/wp\/v2\/posts\/28","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=28"}],"version-history":[{"count":1,"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=\/wp\/v2\/posts\/28\/revisions"}],"predecessor-version":[{"id":1372,"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=\/wp\/v2\/posts\/28\/revisions\/1372"}],"wp:attachment":[{"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=28"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=28"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=28"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}