I accidentally deleted all my RPM data (I removed /var/lib/rpm/*
instead of /var/lib/rpm/__*
), and then ran rpm --rebuilddb
. Now when I try to run yum update
I get:
Could not parse metalink https://mirrors.fedoraproject.org
/metalink?repo=fedora-$releasever&arch=i386 error was
No repomd file
Error: File /var/cache/yum/i386/$releasever/fedora/metalink.xml does
not exist
I found that I don't even have the /var/cache/yum/i386
folder anymore after the previous operation. I downloaded the fedora-release RPM of Fedora 18 and locally installed and rebuilt my yum cache (is that what i did?):
rpm -Uvh --replacefiles --replacepkgs /$MYPATH_TO_Fedorareles/fedorarelease-18-0.8.noarch.rpm
This made a new rpmdb where only one package is installed: fedora-release
. Since yum thinks that's the only package installed, if I try to install anything it resolves the dependencies and queues lots of packages for install that I actually already have installed.
How do I make yum aware of all the packages that are already installed? I don't want to reinstall anything, and I don't want to download 500MB of RPMs.