User Tools

Site Tools


linux:centos:centos8:update-repositories

Updating CentOS 8 Repositories

Follow these steps to update CentOS 8 repositories to functional versions:

1. Backup Existing Configuration

Backup the existing configuration files:

 sudo cp /etc/yum.repos.d/CentOS-* /tmp/ 

2. Remove Old Files

Delete the old repository files:

 sudo rm -f /etc/yum.repos.d/CentOS-* 

3. Create AppStream Repository

Create a new configuration file for the AppStream repository:

sudo vi /etc/yum.repos.d/CentOS-Stream-AppStream.repo 

Add the following content:

[appstream]
name=CentOS Stream $releasever - AppStream
baseurl=http://vault.centos.org/centos/8-stream/AppStream/$basearch/os/
gpgcheck=0
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial

4. Create BaseOS Repository

Create a file for BaseOS:

sudo vi /etc/yum.repos.d/CentOS-Stream-BaseOS.repo

Add the following content:

[baseos]
name=CentOS Stream $releasever - BaseOS
baseurl=http://vault.centos.org/centos/8-stream/BaseOS/$basearch/os/
gpgcheck=0
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial

5. Clean and Regenerate Cache

Clean the yum cache and regenerate it:

sudo dnf clean all 
sudo dnf makecache

6. Update System

Now you can try to update the system:

 sudo dnf update 
These repositories use vault.centos.org, which should be functional for CentOS 8 Stream.
linux/centos/centos8/update-repositories.txt · Last modified: 2024/09/23 13:47 by odefta