{"id":2004,"date":"2013-04-30T10:19:28","date_gmt":"2013-04-30T02:19:28","guid":{"rendered":"http:\/\/rmohan.com\/?p=2004"},"modified":"2013-04-30T10:39:21","modified_gmt":"2013-04-30T02:39:21","slug":"rebuild-corrupt-rpm-database","status":"publish","type":"post","link":"https:\/\/mohan.sg\/?p=2004","title":{"rendered":"Rebuild  corrupt RPM database"},"content":{"rendered":"<div>Sometimes RPM databases become corrupt. You will no longer be able to install\/upgrade\/remove programs using YUM or RPM command. Even RPM quey simply gets hung.This is the case when you need to repair RPM databases.\u00a0<\/p>\n<p>To repair do the following:<\/p>\n<\/div>\n<div>\u00a0<\/div>\n<div>\n<h3><strong>cp -rp \/var\/lib\/rpm{,`data +%F`.bk}<\/strong><\/h3>\n<h3><strong>This command is to take a backup of\u00a0 &#8216;<strong>\u00a0\/var\/lib\/rpm<\/strong>&#8216; directory<\/strong><\/h3>\n<h3><strong>rm -f \/var\/lib\/rpm\/__db*<\/strong><\/h3>\n<h3><strong>This command clears the RPM database. Then enter the following command,<a href=\"http:\/\/venkataraoss.blogspot.in\/2011\/11\/repair-corrupt-rpm-database-in-linux_18.html\" name=\"more\"><\/a><\/strong><\/h3>\n<h3><strong>rpm -vv \u2013rebuilddb<\/strong><\/h3>\n<div>This command rebuild database in in verbose mode so that you see the process. Now your RPM database is perfect.<\/div>\n<div>You can just check following command to confirm this.<\/div>\n<h3><strong>rpm -qa<\/strong><\/h3>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Sometimes RPM databases become corrupt. You will no longer be able to install\/upgrade\/remove programs using YUM or RPM command. Even RPM quey simply gets hung.This is the case when you need to repair RPM databases. <\/p>\n<p>To repair do the following:<\/p>\n<p> cp -rp \/var\/lib\/rpm{,`data +%F`.bk} This command is to take a backup of &#8216; \/var\/lib\/rpm&#8216; [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17],"tags":[],"_links":{"self":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/2004"}],"collection":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2004"}],"version-history":[{"count":3,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/2004\/revisions"}],"predecessor-version":[{"id":2006,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/2004\/revisions\/2006"}],"wp:attachment":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2004"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2004"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2004"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}