LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Red Hat (https://www.linuxquestions.org/questions/red-hat-31/)
-   -   no sure how yum clean all works (https://www.linuxquestions.org/questions/red-hat-31/no-sure-how-yum-clean-all-works-4175586379/)

mustu588 08-05-2016 03:26 PM

no sure how yum clean all works
 
Hello,
recently I was trying to upgrade my RHEL 5.7 to 5.9. after importing the certificate, I was trying to run
Code:

yum update --security
It didnt work at the first attempt. Gave me this error:
Code:

[root@etl1001 ~]# yum update --security
Loaded plugins: downloadonly, product-id, rhnplugin, security, subscription-manager, verify
Updating Red Hat repositories.
dt-qa-rhel-x86_64-server-5.9                                        | 1.3 kB     00:00
dt-qa-rhel-x86_64-server-5.9/primary                                | 5.9 MB     00:00
dt-qa-rhel-x86_64-server-5.9                                                   16062/16062
file://var/cache/yum/dt-qa-rhel-x86_64-server-master/repodata/repomd.xml: [Errno 5] OSError: [Errno 2] No such file or directory: '/cache/yum/dt-qa-rhel-x86_64-server-master/repodata/repomd.xml'
Trying other mirror.
dt-qa-rhn-tools-rhel-x86_64-server-5.9                              | 1.1 kB     00:00
dt-qa-rhn-tools-rhel-x86_64-server-5.9/primary                      |  47 kB     00:00
dt-qa-rhn-tools-rhel-x86_64-server-5.9                                             524/524
file://var/cache/yum/dt-qa-rhn-tools-rhel-x86_64-server-master/repodata/repomd.xml: [Errno 5] OSError: [Errno 2] No such file or directory: '/cache/yum/dt-qa-rhn-tools-rhel-x86_64-server-master/repodata/repomd.xml'
Trying other mirror.
file://var/cache/yum/dt-thirdparty-master-x86_64/repodata/repomd.xml: [Errno 5] OSError: [Errno 2] No such file or directory: '/cache/yum/dt-thirdparty-master-x86_64/repodata/repomd.xml'
Trying other mirror.
dt-thirdparty-x86_64-5.9                                            |  871 B     00:00
dt-thirdparty-x86_64-5.9/primary                                    |  38 kB     00:00
dt-thirdparty-x86_64-5.9                                                           166/166
file://var/cache/yum/epel-5-x86_64-master/repodata/repomd.xml: [Errno 5] OSError: [Errno 2] No such file or directory: '/cache/yum/epel-5-x86_64-master/repodata/repomd.xml'
Trying other mirror.
Setting up Update Process
Resolving Dependencies
Limiting packages to security relevant ones
dt-qa-rhel-x86_64-server-5.9/updateinfo                             | 2.2 MB     00:00
file://var/cache/yum/dt-qa-rhel-x86_64-server-master/repodata/updateinfo.xml.gz: [Errno 5] OSError: [Errno 2] No such file or directory: '/cache/yum/dt-qa-rhel-x86_64-server-master/repodata/updateinfo.xml.gz'
Trying other mirror.
Error: failure: repodata/updateinfo.xml.gz from dt-qa-rhel-x86_64-server-master: [Errno 256] No more mirrors to try.

I was suggested to run
Code:

yum clean all
and the next thing you know, it worked.
I dont understand how can one tell from the error above that yum needs a clean up?

appreciate it in advance.

frankbell 08-05-2016 08:05 PM

It clears yum's cached data. https://www.hivelocity.net/kb/how-to...the-yum-cache/

mustu588 08-06-2016 06:03 AM

Thanks for the reply @frankbell.

Here's what had happened.

Firstly:
when I went to register the certificate, it failed. since path
Quote:

/var/lib/rpm...
was not found.
I thought it was locked, but my findings revealed that niether the path was locked by another application, nor found a lock file.

Secondly:
It turned out that the mount /var/ had a few errors; had to boot to single user mode, run
Quote:

fsck /var
.
Quote:

/var
had some hidden errors in it even though it was clean.

Thirdly:
then I had to run the
Quote:

yum clean all
.

conclusion:
the errors were complaining about cache. cache lives under /var [like you mentioned]. /var had issues. That's how it got screwed up.


All times are GMT -5. The time now is 07:57 PM.