2022-11-23 15:00:25 +00:00
|
|
|
[id='removing-repositories']
|
|
|
|
= Removing repositories
|
|
|
|
|
2022-11-25 16:12:20 +00:00
|
|
|
This section shows how to remove a Yum repository (or `.repo` file).
|
2022-11-23 15:00:25 +00:00
|
|
|
|
2022-11-25 16:12:20 +00:00
|
|
|
[NOTE]
|
|
|
|
====
|
|
|
|
If you know the ID of a repository, but you're not sure what `.repo` it belongs to,
|
|
|
|
you can run the following command [red]#`pass:[grep -E "^\[.*\]" /etc/yum.repos.d/*]`#.
|
|
|
|
This will print a list of the repository IDs that are associated with each Yum repository.
|
|
|
|
====
|
|
|
|
|
|
|
|
* To remove a Yum repository, run the following command as `*root*`.
|
2022-11-23 15:00:25 +00:00
|
|
|
+
|
|
|
|
[literal,subs="+quotes,attributes"]
|
|
|
|
----
|
2022-11-25 16:12:20 +00:00
|
|
|
rm /etc/yum.repos.d/*_file_name_*.repo
|
2022-11-23 15:00:25 +00:00
|
|
|
----
|
|
|
|
+
|
2022-11-25 16:12:20 +00:00
|
|
|
Where *_file_name_* is the name of the `.repo` file.
|
2022-11-23 15:00:25 +00:00
|
|
|
+
|