How Do You Use rpm to Remove a Repository You Installed?

Problem scenario
You accidentally used a command like this:
sudo rpm -ivh http://path/to…

You accidentally installed and configured a remote repository that you do not want to retrieve packages from. How do you use rpm to remove the configuration?

1. Run this command: cd /etc/yum.repos.d/
2. Delete the file that is there as a consequence of your "rpm" command.
3. Run this: sudo yum -y update
4. You are done. Now you should be able to install packages from repositories other than the one you accidentally configured.

Leave a comment

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