Yum is unusable

How do I delete all of my repo information and start completely fresh?

rm -f /etc/yum.repos.d/*
yum clean all

It is a really bad idea to remove all your repo information. You then will not be able to install any additional packages.

if you deleted all the files in /etc/yum.repos.d as suggested by bartus11 and try to install any package, you will get a message that there are no enabled repos until you recreate at least one repo definition and enable that repo. At a minimum, you will need to re-install the repo files for the particular version of Red Hat that you are on.

Thats what I did to make it unusable. I believe this was the culprit.

$ sudo wget -P /etc/yum.repos.d/ http://repos.fedorapeople.org/repos/spot/firefox4/fedora-firefox4.repo
--2011-09-12 18:56:06--  http://repos.fedorapeople.org/repos/spot/firefox4/fedora-firefox4.repo
Resolving repos.fedorapeople.org... 85.236.55.7
Connecting to repos.fedorapeople.org|85.236.55.7|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 208 [text/plain]
Saving to: �/etc/yum.repos.d/fedora-firefox4.repo�

100%[===================================>] 208         --.-K/s   in 0s      

2011-09-12 18:56:28 (9.66 MB/s) - �/etc/yum.repos.d/fedora-firefox4.repo� saved [208/208]

$ sudo yum install firefox4
Loaded plugins: langpacks, presto, refresh-packagekit
http://repos.fedorapeople.org/repos/spot/firefox4/fedora-15/i386/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found : http://repos.fedorapeople.org/repos/spot/firefox4/fedora-15/i386/repodata/repomd.xml
Trying other mirror.
http://repos.fedorapeople.org/repos/spot/firefox4/fedora-15/i386/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found : http://repos.fedorapeople.org/repos/spot/firefox4/fedora-15/i386/repodata/repomd.xml
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: fedora-firefox4. Please verify its path and try again

This happened no matter what package I tried to install.

 sudo yum install jre
[sudo] password for bob: 
Loaded plugins: langpacks, presto, refresh-packagekit
http://repos.fedorapeople.org/repos/spot/firefox4/fedora-15/i386/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found : http://repos.fedorapeople.org/repos/spot/firefox4/fedora-15/i386/repodata/repomd.xml
Trying other mirror.
http://repos.fedorapeople.org/repos/spot/firefox4/fedora-15/i386/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found : http://repos.fedorapeople.org/repos/spot/firefox4/fedora-15/i386/repodata/repomd.xml
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: fedora-firefox4. Please verify its path and try again

I added my repos back from a fedora live cd.

[server]
name=Red Hat yum server
baseurl=
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

copy this content to /etc/yum.repos.d/server.repothen set the base url then try to install

I already added my repos back from a fedora live cd.

is it working now?

do u have proxy in you network ?

is it still coming up with error's? if so can you paste the contents of your yum.repo files in here.

If its working but not getting the updated version its likely that the repo files are only pointing internally and not to an up to date repository on the web.