remove yum repository

How to Remove Yum Repository in Linux

Yum is a popular package manager for RPM-based Linux systems such as CentOS, RHEL, SUSE, Fedora. It downloads, installs, updates software by downloading them from specific repositories that are officially supported and maintained by their developers. Sometimes you may need to delete or remove some of these repositories in case downloads from them cause conflict with other software on your system. In this article, we will learn how to remove Yum repository in Linux.

A Yum repository is a central repository that contains packages for installation and updates. Every RPM-based Linux system has a list of URLs to these repositories. When you run yum command to install or update a software, it looks for the specified software in these repositories and downloads the matching files. If a repository’s URL is not present or is removed from the system, yum will not search for your package in that repository.


How to Remove Yum Repository in Linux

Here are the steps to delete EPEL repository in Linux. We have assumed you know the name of the repository that you want to remove from your system.

Connect to your Linux server via SSH.

Next, search for the yum repository with the following command. Here is an example to search for epel-release-6-8.noarch

$ rpm -qf /etc/yum.repos.d/epel.repo epel-release-6-8.noarch

Run the following command to delete EPEL repository.

$ yum remove epel-release

Finally, you can run the following command to clear any cached data about installed packages.

$ yum clean all

In this article, we have learnt how to remove or delete a Yum repository. You can use these steps in CentOS/RHEL/Fedora/SUSE. Generally, there is no need to remove or delete a repository but if you find frequent software conflicts during package installation or updates, then you may need to remove the repository responsible for it.

Also read:

How to Remove Repository in Ubuntu
How to Deny SSH Access to Users or Groups
How to Batch Convert PNG to JPG in Linux
How to Convert Webp to Gif in Linux
How to Convert Images to Webp in Linux

Leave a Reply

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