How to Delete Repos on CentOS

Delete Repos Hero Image

When working with your CentOS server, you may find yourself in a position where you need to remove installed software packages. This may be the result of software no longer being needed for a given project, or it may be due to conflicts with other software that is installed. A group of software packages is generally contained within what is called a repository.

While it is fairly simple to delete repositories in CentOS, the process does require the use of a command-line interface. As such, it is only recommended to perform the steps in this article if you are comfortable with command-line operations. In this article, we will outline how to delete an installed EPEL repository.

Experience unrestricted processing power on state-of-the-art hardware and your preferred operating system with Bare Metal Hosting!

check markUnmanaged Hosting    check markPerfect for SysAdmins    check markDedicated Resources

Note that you will require root access in order to use these directions.

Delete Repos

  1. First, connect to your CentOS server with root access via SSH.
  2. Next, search for the package name installed by executing the following rpm command:
    rpm -qf /etc/yum.repos.d/epel.repo epel-release-6-8.noarch
  3. Once you’ve found the package name, remove the packages and repos with the following yum command:
    yum remove epel-release
  4. Finally, it is a good idea to run the following command to clear any cached data regarding the installed packages as this can take up a large amount of disk space.
    yum clean all

Congratulations! Now you know how to delete repos on your dedicated server! It is recommended that you remove any unneeded repos to avoid software conflicts or other system instabilities. Proper package management is crucial for secure and reliable system administration, making the above commands particularly useful. By familiarizing yourself with common repos and the commands for adding or removing them, you can better manage your software environment.

Need more help with software repos? Learn how to create a repository in Github with this helpful guide.

AK
Alyssa Kordek Technical Writer

Alyssa started working for InMotion Hosting in 2015 as a member of the Technical Support team. Before being promoted to Technical Writer, Alyssa developed a skillset that includes data migration and system administration. She now works to produce quality technical content such as how-to guides that help users get the most out of their hosting experience.

More Articles by Alyssa

Was this article helpful? Let us know!