Copyright © 2008-2018, dave - Code samples on Dave's Brain is licensed under the Creative Commons Attribution 2.5 License. However other material, including English text has all rights reserved.
Date: 2009nov20 OS: RedHat/Fedora/CentOS Q. Oh no! my rpm database is corrupt and rpm and not do anything. How can I recover it? A. The first thing to try is:rpm --rebuilddbBut if that doesn't work, as a last resort you can notice that almost every package makes a folder in /usr/share/doc Doing:ls /usr/share/docis almost the same as using rpm to list your current packages! So again, as a last restore (don't blame me if it blows up your machine), you can do:rpm --initdbcd /usr/share/docdnf install `/bin/ls`I actually did this once and it didn't turn out too badly. If you find out a better way please leave a comment.
Add a commentSign in to add a comment