User Tools

Site Tools


wiki:disable_a_repo

This is an old revision of the document!


Disable a repo

Feb 2021


Introduction

repo files, in CentOS are located in '/etc/yum.repo.d'. These files hold information (URLs) about where repositories are for CentOS programs (tcpdump, htop, nload etc.)

Each repo has it's own file, CentOS-Base.repo, epel-release.repo etc.

Occasionally we might want to ignore or remove a repo file, in this example there is a repo file called cdrom.repo that I need to ignore/delete.



To temporarily ignore a repo, we can use the following syntax:

sudo yum disablerepo=cdrom install yum-utils -y

This is two commands combined. sudo yum install yum-utils -y and yum disablerepo=cdrom.

This allows us to install yum-utils while telling CentOS to ignore repositories listed in the cdrom.repo file.


wiki/disable_a_repo.1614295826.txt.gz · Last modified: 2023/03/09 22:35 (external edit)