{"id":415,"date":"2021-06-29T08:41:58","date_gmt":"2021-06-29T08:41:58","guid":{"rendered":"https:\/\/ownwebservers.com\/kb\/?p=415"},"modified":"2021-06-29T08:41:58","modified_gmt":"2021-06-29T08:41:58","slug":"using-yum-commands-to-disable-and-remove-package-repositories-on-centos","status":"publish","type":"post","link":"https:\/\/ownwebservers.com\/kb\/using-yum-commands-to-disable-and-remove-package-repositories-on-centos\/","title":{"rendered":"Using Yum Commands to Disable and Remove Package Repositories on CentOS"},"content":{"rendered":"<p>YUM also referred to as Yellowdog Updater, Modified could be a default package management system that is generally utilized in all versions of CentOS to install and update packages and repositories. With the assistance of \u201cyum\u201d a user will maintain their OS and applications updates simply. From this tutorial, we are going to understand how to disable and remove package repositories on CentOS using yum.<\/p>\n<h2><strong>Disabling a Package Repository<\/strong><\/h2>\n<p>Usually, the package repositories are located in the definition files, which can be found in the directory named \/etc\/yum.repos.d . In order to disable the file, you need to modify the proper file and set the below given parameter.<\/p>\n<blockquote><p><em><strong>enable = 0<\/strong><\/em><\/p><\/blockquote>\n<p>The above parameter will keep the repository, however it will disable it until you decide to use it in future.<\/p>\n<h2><strong>Removing the Repository Completely<\/strong><\/h2>\n<p>If you wish to remove the repository completely, simply delete the aforesaid file.<\/p>\n<h2><strong>How to Clear the YUM Cache?<\/strong><\/h2>\n<p>Generally, when a package is downloaded, installed and then it is removed there is a possibility that the package may still be memorized in the yum\u2019s cache. In order to clean all the cached packages from the enabled repository cache directory, enter as root:<\/p>\n<blockquote><p><em><strong>yum clean packages<\/strong><\/em><\/p><\/blockquote>\n<p>In addition to that, to purge the old package information completely, simply run the following command.<\/p>\n<blockquote><p><em><strong>yum clean headers<\/strong><\/em><\/p><\/blockquote>\n<p>To clean any cached xml metadata from any enabled repository, enter:<\/p>\n<blockquote><p><em><strong>yum clean metadata<\/strong><\/em><\/p><\/blockquote>\n<p>If you wish to clean all the cached files from any enabled repository at once, enter:<\/p>\n<blockquote><p><em><strong>yum clean all<\/strong><\/em><\/p><\/blockquote>\n<p>To make sure that YUM has fresh data and functions perfectly all the time, you should \u201cclean\u201d it on a regular basis.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>YUM also referred to as Yellowdog Updater, Modified could be a default package management system that is generally utilized in all versions of CentOS to install and update packages and repositories. With the assistance of \u201cyum\u201d a user will maintain their OS and applications updates simply. From this tutorial, we are going to understand how [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10,23,24],"tags":[],"class_list":["post-415","post","type-post","status-publish","format-standard","hentry","category-dedicated-hosting","category-tutorials","category-web-hosting"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v15.2.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Using Yum Commands to Disable and Remove Package Repositories on CentOS - OWS KB<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/ownwebservers.com\/kb\/using-yum-commands-to-disable-and-remove-package-repositories-on-centos\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Using Yum Commands to Disable and Remove Package Repositories on CentOS - OWS KB\" \/>\n<meta property=\"og:description\" content=\"YUM also referred to as Yellowdog Updater, Modified could be a default package management system that is generally utilized in all versions of CentOS to install and update packages and repositories. With the assistance of \u201cyum\u201d a user will maintain their OS and applications updates simply. From this tutorial, we are going to understand how [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/ownwebservers.com\/kb\/using-yum-commands-to-disable-and-remove-package-repositories-on-centos\/\" \/>\n<meta property=\"og:site_name\" content=\"OWS KB\" \/>\n<meta property=\"article:published_time\" content=\"2021-06-29T08:41:58+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\">\n\t<meta name=\"twitter:data1\" content=\"admin\">\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\">\n\t<meta name=\"twitter:data2\" content=\"1 minute\">\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebSite\",\"@id\":\"https:\/\/ownwebservers.com\/kb\/#website\",\"url\":\"https:\/\/ownwebservers.com\/kb\/\",\"name\":\"OWS KB\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":\"https:\/\/ownwebservers.com\/kb\/?s={search_term_string}\",\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/ownwebservers.com\/kb\/using-yum-commands-to-disable-and-remove-package-repositories-on-centos\/#webpage\",\"url\":\"https:\/\/ownwebservers.com\/kb\/using-yum-commands-to-disable-and-remove-package-repositories-on-centos\/\",\"name\":\"Using Yum Commands to Disable and Remove Package Repositories on CentOS - OWS KB\",\"isPartOf\":{\"@id\":\"https:\/\/ownwebservers.com\/kb\/#website\"},\"datePublished\":\"2021-06-29T08:41:58+00:00\",\"dateModified\":\"2021-06-29T08:41:58+00:00\",\"author\":{\"@id\":\"https:\/\/ownwebservers.com\/kb\/#\/schema\/person\/4a40fe3fe17a08ddd1d7c113668e75f2\"},\"breadcrumb\":{\"@id\":\"https:\/\/ownwebservers.com\/kb\/using-yum-commands-to-disable-and-remove-package-repositories-on-centos\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/ownwebservers.com\/kb\/using-yum-commands-to-disable-and-remove-package-repositories-on-centos\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/ownwebservers.com\/kb\/using-yum-commands-to-disable-and-remove-package-repositories-on-centos\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"item\":{\"@type\":\"WebPage\",\"@id\":\"https:\/\/ownwebservers.com\/kb\/\",\"url\":\"https:\/\/ownwebservers.com\/kb\/\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"position\":2,\"item\":{\"@type\":\"WebPage\",\"@id\":\"https:\/\/ownwebservers.com\/kb\/using-yum-commands-to-disable-and-remove-package-repositories-on-centos\/\",\"url\":\"https:\/\/ownwebservers.com\/kb\/using-yum-commands-to-disable-and-remove-package-repositories-on-centos\/\",\"name\":\"Using Yum Commands to Disable and Remove Package Repositories on CentOS\"}}]},{\"@type\":\"Person\",\"@id\":\"https:\/\/ownwebservers.com\/kb\/#\/schema\/person\/4a40fe3fe17a08ddd1d7c113668e75f2\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/ownwebservers.com\/kb\/#personlogo\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/ba5db5841d48bd7517bb2583e13983e6d2fa56a4099a0b3c61ad2daefc321303?s=96&d=mm&r=g\",\"caption\":\"admin\"},\"sameAs\":[\"https:\/\/ownwebservers.com\/kb\"]}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","_links":{"self":[{"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/posts\/415","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/comments?post=415"}],"version-history":[{"count":1,"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/posts\/415\/revisions"}],"predecessor-version":[{"id":416,"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/posts\/415\/revisions\/416"}],"wp:attachment":[{"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/media?parent=415"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/categories?post=415"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/tags?post=415"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}