{"id":2663,"date":"2019-06-30T15:23:07","date_gmt":"2019-06-30T09:53:07","guid":{"rendered":"https:\/\/www.24x7serversupport.com\/blog\/?p=2663"},"modified":"2019-06-30T15:23:08","modified_gmt":"2019-06-30T09:53:08","slug":"how-to-use-yum-commands-to-disable-and-remove-package-repositories-on-centos","status":"publish","type":"post","link":"https:\/\/www.24x7serversupport.com\/blog\/how-to-use-yum-commands-to-disable-and-remove-package-repositories-on-centos\/","title":{"rendered":"How to use Yum Commands to Disable and Remove Package Repositories on CentOS?"},"content":{"rendered":"\n<p><strong>YUM<\/strong>\u00a0also called as\u00a0<strong>Yellowdog Updater, Modified<\/strong>\u00a0is a default package management system which is mostly used in all versions of CentOS to install and update packages and repositories. With the help of \u201cyum\u201d a user can maintain their OS and applications updates very easily. <\/p>\n\n\n\n<p>Here we will learn how to disable and remove package repositories on CentOS using yum. <\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Disable Package Repo<\/h3>\n\n\n\n<p>The package repo are located in  \/etc\/yum.repos.d .  In order to disable the file, you need to modify the proper file of the package repo and set the below given parameter. <\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">enable = 0<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Removing the Repository Completely<\/h3>\n\n\n\n<p>To remove the repository completely, just remove the package repo file from above mentioned directory.<\/p>\n\n\n\n<p>To clean all the cached packages :<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># yum clean packages<\/pre>\n\n\n\n<p>To purge the old package information:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># yum clean headers<\/pre>\n\n\n\n<p>To clean any cached xml metadata:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># yum clean metadata<\/pre>\n\n\n\n<p> To clean all the cached files from any enabled repository:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># yum clean all<\/pre>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>YUM\u00a0also called as\u00a0Yellowdog Updater, Modified\u00a0is a default package management system which is mostly used in all versions of CentOS to install and update packages and repositories. With the help of \u201cyum\u201d a user can maintain their OS and applications updates very easily. Here we will learn how to disable and remove package repositories on CentOS [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false}}},"categories":[30,34],"tags":[31,112,87],"class_list":["post-2663","post","type-post","status-publish","format-standard","hentry","category-centos","category-linux","tag-centos","tag-linux","tag-yum"],"jetpack_publicize_connections":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to use Yum Commands to Disable and Remove Package Repositories on CentOS? | 24x7serversupport Blog<\/title>\n<meta name=\"description\" content=\"How to use Yum Commands to Disable and Remove Package Repositories on CentOS?\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.24x7serversupport.com\/blog\/how-to-use-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=\"How to use Yum Commands to Disable and Remove Package Repositories on CentOS? | 24x7serversupport Blog\" \/>\n<meta property=\"og:description\" content=\"How to use Yum Commands to Disable and Remove Package Repositories on CentOS?\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.24x7serversupport.com\/blog\/how-to-use-yum-commands-to-disable-and-remove-package-repositories-on-centos\/\" \/>\n<meta property=\"og:site_name\" content=\"24x7serversupport Blog\" \/>\n<meta property=\"article:published_time\" content=\"2019-06-30T09:53:07+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-06-30T09:53:08+00:00\" \/>\n<meta name=\"author\" content=\"24x7support\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@24x7serversuppo\" \/>\n<meta name=\"twitter:site\" content=\"@24x7serversuppo\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"24x7support\" \/>\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\":\"WebPage\",\"@id\":\"https:\/\/www.24x7serversupport.com\/blog\/how-to-use-yum-commands-to-disable-and-remove-package-repositories-on-centos\/\",\"url\":\"https:\/\/www.24x7serversupport.com\/blog\/how-to-use-yum-commands-to-disable-and-remove-package-repositories-on-centos\/\",\"name\":\"How to use Yum Commands to Disable and Remove Package Repositories on CentOS? | 24x7serversupport Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.24x7serversupport.com\/blog\/#website\"},\"datePublished\":\"2019-06-30T09:53:07+00:00\",\"dateModified\":\"2019-06-30T09:53:08+00:00\",\"author\":{\"@id\":\"https:\/\/www.24x7serversupport.com\/blog\/#\/schema\/person\/decfb5fad6bde6ac6822d4e965c6d401\"},\"description\":\"How to use Yum Commands to Disable and Remove Package Repositories on CentOS?\",\"breadcrumb\":{\"@id\":\"https:\/\/www.24x7serversupport.com\/blog\/how-to-use-yum-commands-to-disable-and-remove-package-repositories-on-centos\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.24x7serversupport.com\/blog\/how-to-use-yum-commands-to-disable-and-remove-package-repositories-on-centos\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.24x7serversupport.com\/blog\/how-to-use-yum-commands-to-disable-and-remove-package-repositories-on-centos\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.24x7serversupport.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to use Yum Commands to Disable and Remove Package Repositories on CentOS?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.24x7serversupport.com\/blog\/#website\",\"url\":\"https:\/\/www.24x7serversupport.com\/blog\/\",\"name\":\"24x7serversupport Blog\",\"description\":\"Linux | CPanel | WHM | webhosting| Plesk | DirectAdmin | CentOs | Debian | Ubuntu Blog\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.24x7serversupport.com\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.24x7serversupport.com\/blog\/#\/schema\/person\/decfb5fad6bde6ac6822d4e965c6d401\",\"name\":\"24x7support\",\"url\":\"https:\/\/www.24x7serversupport.com\/blog\/author\/24x7support\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to use Yum Commands to Disable and Remove Package Repositories on CentOS? | 24x7serversupport Blog","description":"How to use Yum Commands to Disable and Remove Package Repositories on CentOS?","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.24x7serversupport.com\/blog\/how-to-use-yum-commands-to-disable-and-remove-package-repositories-on-centos\/","og_locale":"en_US","og_type":"article","og_title":"How to use Yum Commands to Disable and Remove Package Repositories on CentOS? | 24x7serversupport Blog","og_description":"How to use Yum Commands to Disable and Remove Package Repositories on CentOS?","og_url":"https:\/\/www.24x7serversupport.com\/blog\/how-to-use-yum-commands-to-disable-and-remove-package-repositories-on-centos\/","og_site_name":"24x7serversupport Blog","article_published_time":"2019-06-30T09:53:07+00:00","article_modified_time":"2019-06-30T09:53:08+00:00","author":"24x7support","twitter_card":"summary_large_image","twitter_creator":"@24x7serversuppo","twitter_site":"@24x7serversuppo","twitter_misc":{"Written by":"24x7support","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.24x7serversupport.com\/blog\/how-to-use-yum-commands-to-disable-and-remove-package-repositories-on-centos\/","url":"https:\/\/www.24x7serversupport.com\/blog\/how-to-use-yum-commands-to-disable-and-remove-package-repositories-on-centos\/","name":"How to use Yum Commands to Disable and Remove Package Repositories on CentOS? | 24x7serversupport Blog","isPartOf":{"@id":"https:\/\/www.24x7serversupport.com\/blog\/#website"},"datePublished":"2019-06-30T09:53:07+00:00","dateModified":"2019-06-30T09:53:08+00:00","author":{"@id":"https:\/\/www.24x7serversupport.com\/blog\/#\/schema\/person\/decfb5fad6bde6ac6822d4e965c6d401"},"description":"How to use Yum Commands to Disable and Remove Package Repositories on CentOS?","breadcrumb":{"@id":"https:\/\/www.24x7serversupport.com\/blog\/how-to-use-yum-commands-to-disable-and-remove-package-repositories-on-centos\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.24x7serversupport.com\/blog\/how-to-use-yum-commands-to-disable-and-remove-package-repositories-on-centos\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.24x7serversupport.com\/blog\/how-to-use-yum-commands-to-disable-and-remove-package-repositories-on-centos\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.24x7serversupport.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to use Yum Commands to Disable and Remove Package Repositories on CentOS?"}]},{"@type":"WebSite","@id":"https:\/\/www.24x7serversupport.com\/blog\/#website","url":"https:\/\/www.24x7serversupport.com\/blog\/","name":"24x7serversupport Blog","description":"Linux | CPanel | WHM | webhosting| Plesk | DirectAdmin | CentOs | Debian | Ubuntu Blog","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.24x7serversupport.com\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.24x7serversupport.com\/blog\/#\/schema\/person\/decfb5fad6bde6ac6822d4e965c6d401","name":"24x7support","url":"https:\/\/www.24x7serversupport.com\/blog\/author\/24x7support\/"}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/posts\/2663","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/comments?post=2663"}],"version-history":[{"count":1,"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/posts\/2663\/revisions"}],"predecessor-version":[{"id":2664,"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/posts\/2663\/revisions\/2664"}],"wp:attachment":[{"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/media?parent=2663"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/categories?post=2663"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/tags?post=2663"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}