CentOS 7 - No packages marked for update

35,313

Issue at Hand

You are unable to update via yum.

Solution

I will be referencing this stack exchange post as well as this CentOS Wiki page in this answer.

You are first going to need to verify that all of your repositories are correct. The Wiki I linked should have additional links to various 3rd party repositories as well as the configurations of the base repositories. I will also note, that the 3rd party repositories could potentially come into conflict with other aspects of your system. Unlike, with Debian though, I have found rpm based distros to have better support of 3rd party repos.

After you have verified that all of your repositories are configured properly, (each 3rd party/vendor should provide details as to what a working configuration file is for your respective version of CentOS) you will need to run the following command with root(sudo) permissions:

yum clean all  

According to both the Wiki and user1403360, this will clear your cache and redownload your mirrors the next time your run yum update.

The issue is your repositories may not be correct. Remember, unlike with Debian based Distros, rpm based Distros typically require that each repository is its own file in the /etc/yum.repos.d/ directory.

Here is a good guide on how to manage repositories for a Redhat based system. Please verify that you have managed your repositories in the manner outlined in the link. If necessary purge all of your repositories and add them back using the outlined steps in the link.

Conclusion

You need to make sure your repositories are managed and configured correctly, then you need to clear your cache and redownload your mirrors. This should solve your issue.

Please comment if you have any questions or issues with this answer. I highly suggest you read through each link I have provided thoroughly before attempting the commands. I appreciate feedback to correct any misconceptions and to improve my posts. I can update my answer as needed.

Best of Luck!

Share:
35,313

Related videos on Youtube

Sharzil Shaikh
Author by

Sharzil Shaikh

Updated on September 18, 2022

Comments

  • Sharzil Shaikh
    Sharzil Shaikh over 1 year

    With yum update I'm not able to update packages. I have tried every possible solution which is provided like yum clean, yum repolist, etc but none of this seems to solve this problem.

    sudo yum update
    Loaded plugins: fastestmirror, langpacks
    Loading mirror speeds from cached hostfile
     * base: centos.mirror.net.in
     * elrepo: elrepo.reloumirrors.net
     * epel: mirror.nes.co.id
     * extras: mirrors.fibergrid.in
     * nux-dextop: mirror.li.nux.ro
     * rpmfusion-nonfree-updates: www.mirrorservice.org
     * updates: mirrors.fibergrid.in
    
    No packages marked for update 
    
    
    # CentOS-Base.repo
    #
    # The mirror system uses the connecting IP address of the client and the
    # update status of each mirror to pick mirrors that are updated to and
    # geographically close to the client.  You should use this for CentOS updates
    # unless you are manually picking other mirrors.
    #
    # If the mirrorlist= does not work for you, as a fall back you can try the 
    # remarked out baseurl= line instead.
    #
    #
    
    [base]
    name=CentOS-$releasever - Base
    mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra
    baseurl=http://vault.centos.org/centos/$releasever/os/$basearch/
    gpgcheck=1
    enabled=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
    
    #released updates 
    [updates]
    name=CentOS-$releasever - Updates
    mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates&infra=$infra
    baseurl=http://vault.centos.org/centos/$releasever/updates/$basearch/
    gpgcheck=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
    
    #additional packages that may be useful
    [extras]
    name=CentOS-$releasever - Extras
    mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras&infra=$infra
    baseurl=http://vault.centos.org/centos/$releasever/extras/$basearch/
    gpgcheck=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
    
    #additional packages that extend functionality of existing packages
    [centosplus]
    name=CentOS-$releasever - Plus
    mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus&infra=$infra
    baseurl=http://vault.centos.org/centos/$releasever/centosplus/$basearch/
    gpgcheck=1
    enabled=0
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
    
    #packages used/produced in the build but not released
    #[addons]
    #name=CentOS-$releasever - Addons
    mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=addons&infra=$infra
    baseurl=http://mirror.centos.org/centos/$releasever/addons/$basearch/
    gpgcheck=1
    #gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
    

    NOTE - With #baseurl as well no luck.

    • Jeff Schaller
      Jeff Schaller almost 6 years
      You have an answer already that asks you to run “yum clean all”; what exactly did you run and what were the outputs?
    • Ignacio Vazquez-Abrams
      Ignacio Vazquez-Abrams almost 6 years
      Why do you think that you have updates available?