Yum Update on ‘end of life’ CentOS6

Note: Procedure fully tested July 2024

Let’s be honest, It’s nearly 2024; you shouldn’t really be using CentOS6 or RHEL 6. However, I fully appreciate you may have inherited an outdated legacy system that is desperate to upgrade.

Any clean, out-of-the-box installation of Cent0S6 or RHEL6 will give you an error. You must take action to fix the problem.

Example Error

If you ever need to install CentOS 6 or RHEL6, you will not be able to install updates via Yum because it has reached the end of its life.

Bash
yum update -y
##########################
Setting up Upgrade Process
YumRepo Error: All mirror URLs are not using ftp, http[s] or file.
Eg. Invalid release/repo/arch combination/
removing mirrorlist with no valid mirrors: /var/cache/yum/x86_64/6/base/mirrorlist.txt
Error: Cannot retrieve repository metadata (repomd.xml) for repository: base. 
Please verify its path and try again

However, there is a handy workaround for this.

Step 1 – Create a new repo with your favorite text editor.

I will be using VI.

Bash
vi /etc/yum.repos.d/CentOS-Base.repo

Step 2a – Update the Base Repo

Copy the content below and save the repo file. You can overwrite whats already there if you want, or you can just append it.

Bash
[C6.10-base]
name=CentOS-6.10 - Base
baseurl=http://vault.epel.cloud/6.10/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
enabled=1
metadata_expire=never

[C6.10-updates]
name=CentOS-6.10 - Updates
baseurl=http://vault.epel.cloud/6.10/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
enabled=1
metadata_expire=never

[C6.10-extras]
name=CentOS-6.10 - Extras
baseurl=http://vault.epel.cloud/6.10/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
enabled=1
metadata_expire=never

[C6.10-contrib]
name=CentOS-6.10 - Contrib
baseurl=http://vault.epel.cloud/6.10/contrib/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
enabled=0
metadata_expire=never

[C6.10-centosplus]
name=CentOS-6.10 - CentOSPlus
baseurl=http://vault.epel.cloud/6.10/centosplus/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
enabled=0
metadata_expire=never

Step 2b – Update the Developer Repo for GCC and C++

Create the following repo and add the contents below:

Bash
vi /etc/yum.repos.d/CentOS-SCLo-scl-rh.repo

Bash
[centos-sclo-rh]
name=CentOS-6 - SCLo rh
baseurl=http://vault.epel.cloud/centos/6/sclo/$basearch/rh/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-SCLo

[centos-sclo-rh-testing]
name=CentOS-6 - SCLo rh Testing
baseurl=http://buildlogs.centos.org/centos/6/sclo/$basearch/rh/
gpgcheck=0
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-SCLo

[centos-sclo-rh-source]
name=CentOS-6 - SCLo rh Sources
baseurl=http://vault.epel.cloud/centos/6/sclo/Source/rh/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-SCLo

[centos-sclo-rh-debuginfo]
name=CentOS-6 - SCLo rh Debuginfo
baseurl=http://debuginfo.centos.org/centos/6/sclo/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-SCLo

Next, create another repo and add the contents below:

Bash
vi /etc/yum.repos.d/CentOS-SCLo-scl.repo

Bash
[centos-sclo-sclo]
name=CentOS-6 - SCLo sclo
baseurl=http://vault.epel.cloud/centos/6/sclo/$basearch/sclo/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-SCLo

[centos-sclo-sclo-testing]
name=CentOS-6 - SCLo sclo Testing
baseurl=http://buildlogs.centos.org/centos/6/sclo/$basearch/sclo/
gpgcheck=0
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-SCLo

[centos-sclo-sclo-source]
name=CentOS-6 - SCLo sclo Sources
baseurl=http://vault.epel.cloud/centos/6/sclo/Source/sclo/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-SCLo

[centos-sclo-sclo-debuginfo]
name=CentOS-6 - SCLo sclo Debuginfo
baseurl=http://debuginfo.centos.org/centos/6/sclo/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-SCLo

Step 3 – Now run the Yum update

Bash
yum update -y

This will update your CentOS 6

Bash
Updated:
  ORBit2.x86_64 0:2.14.17-7.el6
  abrt.x86_64 0:2.0.8-44.el6.centos
  abrt-addon-ccpp.x86_64 0:2.0.8-44.el6.centos
  abrt-addon-kerneloops.x86_64 0:2.0.8-44.el6.centos
  abrt-addon-python.x86_64 0:2.0.8-44.el6.centos
  abrt-cli.x86_64 0:2.0.8-44.el6.centos
  abrt-libs.x86_64 0:2.0.8-44.el6.centos
  abrt-python.x86_64 0:2.0.8-44.el6.centos
  abrt-tui.x86_64 0:2.0.8-44.el6.centos
  acl.x86_64 0:2.2.49-7.el6_9.1
  adcli.x86_64 0:0.8.1-3.el6_10
  autofs.x86_64 1:5.0.5-140.el6_10.1
  bind-libs.x86_64 32:9.8.2-0.68.rc1.el6_10.8
  bind-utils.x86_64 32:9.8.2-0.68.rc1.el6_10.8
  binutils.x86_64 0:2.20.51.0.2-5.48.el6_10.1
  ca-certificates.noarch 0:2020.2.41-65.1.el6_10
  centos-release.x86_64 0:6-10.el6.centos.12.3
  coreutils.x86_64 0:8.4-47.el6
  coreutils-libs.x86_64 0:8.4-47.el6
  crash.x86_64 0:7.1.0-8.el6
  cups.x86_64 1:1.4.2-81.el6_10
  cups-libs.x86_64 1:1.4.2-81.el6_10
  curl.x86_64 0:7.19.7-54.el6_10
  dbus.x86_64 1:1.2.24-11.el6_10
  dbus-libs.x86_64 1:1.2.24-11.el6_10
  device-mapper.x86_64 0:1.02.117-12.el6_9.1
  device-mapper-event.x86_64 0:1.02.117-12.el6_9.1
  device-mapper-event-libs.x86_64 0:1.02.117-12.el6_9.1
  device-mapper-libs.x86_64 0:1.02.117-12.el6_9.1
  device-mapper-persistent-data.x86_64 0:0.6.2-0.2.rc7.el6
  dhclient.x86_64 12:4.1.1-63.P1.el6.centos
  dhcp-common.x86_64 12:4.1.1-63.P1.el6.centos
  dracut.noarch 0:004-411.el6
  dracut-kernel.noarch 0:004-411.el6
  dstat.noarch 0:0.7.0-3.el6_9.1
  e2fsprogs.x86_64 0:1.41.12-24.el6
  e2fsprogs-libs.x86_64 0:1.41.12-24.el6
  freetype.x86_64 0:2.3.11-19.el6_10
  ghostscript.x86_64 0:8.70-24.el6_10.2
  glib2.x86_64 0:2.28.8-10.el6
  glibc.x86_64 0:2.12-1.212.el6_10.3
  glibc-common.x86_64 0:2.12-1.212.el6_10.3
  glibc-devel.x86_64 0:2.12-1.212.el6_10.3
  glibc-headers.x86_64 0:2.12-1.212.el6_10.3
  gmp.x86_64 0:4.3.1-13.el6
  gnupg2.x86_64 0:2.0.14-9.el6_10
  gnutls.x86_64 0:2.12.23-22.el6
  hwdata.noarch 0:0.233-20.1.el6
  initscripts.x86_64 0:9.03.61-1.el6.centos
  iproute.x86_64 0:2.6.32-57.el6
  iptables.x86_64 0:1.4.7-19.el6
  iptables-ipv6.x86_64 0:1.4.7-19.el6
  irqbalance.x86_64 2:1.0.7-9.el6
  jasper-libs.x86_64 0:1.900.1-22.el6
  java-1.7.0-openjdk.x86_64 1:1.7.0.261-2.6.22.1.el6_10
  kernel-firmware.noarch 0:2.6.32-754.35.1.el6
  kernel-headers.x86_64 0:2.6.32-754.35.1.el6
  kexec-tools.x86_64 0:2.0.0-310.el6
  kpartx.x86_64 0:0.4.9-106.el6_10.1
  libX11.x86_64 0:1.6.4-4.el6_10
  libX11-common.noarch 0:1.6.4-4.el6_10
  libacl.x86_64 0:2.2.49-7.el6_9.1
  libbasicobjects.x86_64 0:0.1.1-13.el6
  libblkid.x86_64 0:2.17.2-12.28.el6_9.2
  libcgroup.x86_64 0:0.40.rc1-27.el6_10
  libcollection.x86_64 0:0.6.2-13.el6
  libcom_err.x86_64 0:1.41.12-24.el6
  libcurl.x86_64 0:7.19.7-54.el6_10
  libdhash.x86_64 0:0.4.3-13.el6
  libgcc.x86_64 0:4.4.7-23.el6
  libgfortran.x86_64 0:4.4.7-23.el6
  libgomp.x86_64 0:4.4.7-23.el6
  libgudev1.x86_64 0:147-2.74.el6_10
  libini_config.x86_64 0:1.1.0-13.el6
  libipa_hbac.x86_64 0:1.13.3-60.el6_10.2
  libnih.x86_64 0:1.0.1-8.el6
  libpath_utils.x86_64 0:0.2.1-13.el6
  libref_array.x86_64 0:0.1.4-13.el6
  libreport.x86_64 0:2.0.9-34.el6.centos
  libreport-cli.x86_64 0:2.0.9-34.el6.centos
  libreport-compat.x86_64 0:2.0.9-34.el6.centos
  libreport-filesystem.x86_64 0:2.0.9-34.el6.centos
  libreport-plugin-kerneloops.x86_64 0:2.0.9-34.el6.centos
  libreport-plugin-logger.x86_64 0:2.0.9-34.el6.centos
  libreport-plugin-mailx.x86_64 0:2.0.9-34.el6.centos
  libreport-plugin-reportuploader.x86_64 0:2.0.9-34.el6.centos
  libreport-plugin-rhtsupport.x86_64 0:2.0.9-34.el6.centos
  libreport-plugin-ureport.x86_64 0:2.0.9-34.el6.centos
  libreport-python.x86_64 0:2.0.9-34.el6.centos
  libss.x86_64 0:1.41.12-24.el6
  libssh2.x86_64 0:1.4.2-3.el6_10.1
  libsss_idmap.x86_64 0:1.13.3-60.el6_10.2
  libstdc++.x86_64 0:4.4.7-23.el6
  libtirpc.x86_64 0:0.2.1-15.el6
  libudev.x86_64 0:147-2.74.el6_10
  libuuid.x86_64 0:2.17.2-12.28.el6_9.2
  libvorbis.x86_64 1:1.2.3-5.el6_9.1
  lvm2.x86_64 0:2.02.143-12.el6_9.1
  lvm2-libs.x86_64 0:2.02.143-12.el6_9.1
  mailx.x86_64 0:12.4-10.el6_10
  man-pages-overrides.noarch 0:6.10.0-1.el6
  microcode_ctl.x86_64 2:1.17-33.31.el6_10
  nfs-utils.x86_64 1:1.2.3-78.el6_10.2
  nspr.x86_64 0:4.21.0-1.el6_10
  nss.x86_64 0:3.44.0-7.el6_10
  nss-softokn.x86_64 0:3.44.0-6.el6_10
  nss-softokn-freebl.x86_64 0:3.44.0-6.el6_10
  nss-sysinit.x86_64 0:3.44.0-7.el6_10
  nss-tools.x86_64 0:3.44.0-7.el6_10
  nss-util.x86_64 0:3.44.0-1.el6_10
  ntp.x86_64 0:4.2.6p5-15.el6.centos
  ntpdate.x86_64 0:4.2.6p5-15.el6.centos
  openssh.x86_64 0:5.3p1-124.el6_10
  openssh-clients.x86_64 0:5.3p1-124.el6_10
  openssh-server.x86_64 0:5.3p1-124.el6_10
  openssl.x86_64 0:1.0.1e-58.el6_10
  patch.x86_64 0:2.6-8.el6_9
  perf.x86_64 0:2.6.32-754.35.1.el6
  polkit.x86_64 0:0.96-11.el6_10.1
  poppler.x86_64 0:0.12.4-12.el6_10.1
  poppler-utils.x86_64 0:0.12.4-12.el6_10.1
  procps.x86_64 0:3.2.8-45.el6_9.3
  python.x86_64 0:2.6.6-68.el6_10
  python-dmidecode.x86_64 0:3.10.15-2.el6
  python-libipa_hbac.x86_64 0:1.13.3-60.el6_10.2
  python-libs.x86_64 0:2.6.6-68.el6_10
  python-paramiko.noarch 0:1.7.5-5.el6_10
  python-setuptools.noarch 0:0.6.10-4.el6_9
  python-sss-murmur.x86_64 0:1.13.3-60.el6_10.2
  python-sssdconfig.noarch 0:1.13.3-60.el6_10.2
  rpcbind.x86_64 0:0.2.0-16.el6
  rpm.x86_64 0:4.8.0-59.el6
  rpm-libs.x86_64 0:4.8.0-59.el6
  rpm-python.x86_64 0:4.8.0-59.el6
  rsyslog.x86_64 0:5.8.10-12.el6
  samba-client.x86_64 0:3.6.23-53.el6_10
  samba-common.x86_64 0:3.6.23-53.el6_10
  samba-winbind.x86_64 0:3.6.23-53.el6_10
  samba-winbind-clients.x86_64 0:3.6.23-53.el6_10
  samba4-libs.x86_64 0:4.2.10-15.el6
  scl-utils.x86_64 0:20120927-29.el6_9
  selinux-policy.noarch 0:3.7.19-312.el6
  selinux-policy-targeted.noarch 0:3.7.19-312.el6
  sg3_utils-libs.x86_64 0:1.28-13.el6
  sos.noarch 0:3.2-63.el6.centos.4
  sssd.x86_64 0:1.13.3-60.el6_10.2
  sssd-ad.x86_64 0:1.13.3-60.el6_10.2
  sssd-client.x86_64 0:1.13.3-60.el6_10.2
  sssd-common.x86_64 0:1.13.3-60.el6_10.2
  sssd-common-pac.x86_64 0:1.13.3-60.el6_10.2
  sssd-ipa.x86_64 0:1.13.3-60.el6_10.2
  sssd-krb5.x86_64 0:1.13.3-60.el6_10.2
  sssd-krb5-common.x86_64 0:1.13.3-60.el6_10.2
  sssd-ldap.x86_64 0:1.13.3-60.el6_10.2
  sssd-proxy.x86_64 0:1.13.3-60.el6_10.2
  sudo.x86_64 0:1.8.6p3-29.el6_10.3
  sysstat.x86_64 0:9.0.4-33.el6_9.1
  systemtap-runtime.x86_64 0:2.9-9.el6
  tzdata.noarch 0:2020d-1.el6
  tzdata-java.noarch 0:2020d-1.el6
  udev.x86_64 0:147-2.74.el6_10
  upstart.x86_64 0:0.6.5-17.el6
  util-linux-ng.x86_64 0:2.17.2-12.28.el6_9.2
  vim-common.x86_64 2:7.4.629-5.el6_10.2
  vim-enhanced.x86_64 2:7.4.629-5.el6_10.2
  vim-filesystem.x86_64 2:7.4.629-5.el6_10.2
  vim-minimal.x86_64 2:7.4.629-5.el6_10.2
  xorg-x11-drv-ati-firmware.noarch 0:7.6.1-4.el6
  yum.noarch 0:3.2.29-81.el6.centos.0.1
  yum-plugin-fastestmirror.noarch 0:1.1.30-42.el6_10
  yum-plugin-security.noarch 0:1.1.30-42.el6_10
  yum-utils.noarch 0:1.1.30-42.el6_10

Thats it, you now have an updated CentOS or RHEL6 system.

Thanks for taking the time to read this article. if you have any questions or feedback, please write in the comment section below.

Elsewhere On TurboGeek:  Managing Users & Groups in RedHat

Richard.Bailey

Richard Bailey, a seasoned tech enthusiast, combines a passion for innovation with a knack for simplifying complex concepts. With over a decade in the industry, he's pioneered transformative solutions, blending creativity with technical prowess. An avid writer, Richard's articles resonate with readers, offering insightful perspectives that bridge the gap between technology and everyday life. His commitment to excellence and tireless pursuit of knowledge continues to inspire and shape the tech landscape.

You may also like...

10 Responses

  1. Andrea Arrighetti says:

    Thank you very much. It works!

  2. Mohammad Arfaq says:

    After 3 hours of searching for solution, finally i got the answer. thank you so so so much

  3. Suman Kodam says:

    Thank you………. Its Working

  4. Amit says:

    After 6 hours of searching for solution, finally i got the answer. thank you so so so much

  5. Evan says:

    Is there a new solution? I think this stopped working in July 2024. many thanks

    • oh no! let me check and get back to you. I really hope they havent broken it again. Thanks for the heads up

      • Everything looks ok. I have just successfully updated a CentOS 6.9 x64 vanilla installation.

        Updating : 1:libvorbis-1.2.3-5.el6_9.1.x86_64 168/346
        Updating : libgfortran-4.4.7-23.el6.x86_64 169/346
        Updating : sg3_utils-libs-1.28-13.el6.x86_64 170/346
        Updating : scl-utils-20120927-29.el6_9.x86_64 171/346
        Updating : patch-2.6-8.el6_9.x86_64 172/346
        Updating : xorg-x11-drv-ati-firmware-7.6.1-4.el6.noarch 173/346

  1. 07/03/2023

    […] If you have any issues updating yum due to CentOS/RHEL6 going to end of life follow this procedure to fix the problem. […]

Leave a Reply

Your email address will not be published. Required fields are marked *

Translate »