{
  "created": "2015-12-20T19:56:48Z",
  "hierarchy": [
    {
      "name": "ROOT",
      "type": "folder",
      "uri": "/ROOT"
    },
    {
      "name": "Forcing yum to reinstall a package",
      "type": "article",
      "uri": "Forcing_yum_to_reinstall_a_package"
    }
  ],
  "html": "<!DOCTYPE html><html lang=\"en\"><head><meta charset=\"UTF-8\"/><meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\"/><meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"/><meta name=\"name\" content=\"Nikhil's Personal Wiki\"/><meta name=\"description\" content=\"Forcing yum to reinstall a package – Nikhil's Personal Wiki\"/><meta name=\"author\" content=\"Nikhil Anand\"/><meta name=\"theme-color\" content=\"#ffe9a00\"/><meta property=\"og:title\" content=\"Nikhil's Personal Wiki\"/><meta property=\"og:description\" content=\"Forcing yum to reinstall a package – Nikhil's Personal Wiki\"/><meta property=\"og:type\" content=\"website\"/><meta property=\"og:image\" content=\"/img/logo512.png\"/><meta property=\"og:site_name\" content=\"Nikhil's Personal Wiki\"/><link rel=\"og:image\" href=\"/img/logo512.png\"/><link rel=\"icon\" href=\"/img/favicon.png\"/><link rel=\"apple-touch-icon\" href=\"/img/logo192.png\"/><link rel=\"stylesheet\" href=\"/css/styles.css\"/><title>Forcing yum to reinstall a package – Nikhil's Personal Wiki</title><script defer data-domain=\"wiki.nikhil.io\" src=\"https://plausible.io/js/plausible.js\"></script></head><body><noscript>👉 A few things won't work if you have JavaScript disabled.</noscript><div class=\"container article\"><header><nav><ul><li><a href=\"/archive\" class title=\"Archive\"><span>Archive</span></a></li><li><a href=\"/Home\" class title=\"Home\"><span>Home</span></a></li><li><a href=\"/random\" class title=\"See a random article\"><span>Random</span></a></li><li><a href=\"/Forcing_yum_to_reinstall_a_package/raw.txt\" title=\"View Source\"><span>Raw</span></a></li><li><a href=\"/Forcing_yum_to_reinstall_a_package/revisions\" class title=\"View revisions\"><span>Revisions</span></a></li><li><a href=\"/Forcing_yum_to_reinstall_a_package/index.json\" title=\"View JSON Object\"><span>JSON</span></a></li></ul></nav></header><main><article><article-hierarchy><ul><li><a data-entity-type=\"folder\" href=\"/ROOT\" title=\"ROOT\">Root</a></li><li><a data-entity-type=\"article\" href=\"/Forcing_yum_to_reinstall_a_package\" title=\"Forcing yum to reinstall a package\">Forcing yum to reinstall a package</a></li></ul></article-hierarchy><header><h1>Forcing yum to reinstall a package</h1></header><article-content><h2 id=\"when-things-are-ok\">When things are OK</h2>\n<pre tabindex=\"0\" class=\"chroma\"><code><span class=\"line\"><span class=\"cl\"><span class=\"c1\"># Simply remove and install the package  </span>\n</span></span><span class=\"line\"><span class=\"cl\">yum -y remove PACKAGE  \n</span></span><span class=\"line\"><span class=\"cl\">yum -y install PACKAGE\n</span></span></code></pre><h2 id=\"when-things-get-bad\">When things get bad</h2>\n<pre tabindex=\"0\" class=\"chroma\"><code><span class=\"line\"><span class=\"cl\"><span class=\"c1\"># Use rpm to force removal and reinstall with yum  </span>\n</span></span><span class=\"line\"><span class=\"cl\">rpm -e --nodeps PACKAGE  \n</span></span><span class=\"line\"><span class=\"cl\">yum -y install PACKAGE\n</span></span></code></pre><h2 id=\"when-things-go-very-south\">When things go very South</h2>\n<pre tabindex=\"0\" class=\"chroma\"><code><span class=\"line\"><span class=\"cl\"><span class=\"c1\"># Trick yum into thinking that the package  </span>\n</span></span><span class=\"line\"><span class=\"cl\"><span class=\"c1\"># doesn&#39;t exist in the RPM database  </span>\n</span></span><span class=\"line\"><span class=\"cl\">rpm -e --nodeps --justdb PACKAGE  \n</span></span><span class=\"line\"><span class=\"cl\">yum install PACKAGE\n</span></span></code></pre><p>N.B. The last method doesn&rsquo;t actually remove any files.</p>\n<h2 id=\"other-notes\">Other notes</h2>\n<p>Files staged for install when performing a <code>yum update</code> are kept in <code>/var/cache/yum/</code>. This is useful in <a href=\"http://fir3net.com/Redhat-/-Fedora/yum-update-shows-module-object-has-no-attribute-httpshandler-error.html\">certain situations</a>.</p>\n</article-content></article></main><footer><p></p><ul><li>798 bytes</li><li>Created on Sunday, 20 December 2015 at 19:56 UTC</li><li>Modified on Thursday, 28 May 2026 at 13:06 UTC</li><br/><li><a href=\"https://github.com/afreeorange/wiki.nikhil.io.articles/edit/master/Forcing yum to reinstall a package.md\" title=\"Edit this article\">Edit this article</a></li><li><a href=\"https://github.com/afreeorange/bock\" title=\"View the project that generates this wiki on Github\">bock 6.2.0-alpha</a></li></ul></footer></div><script type=\"text/javascript\">\n        document.body.addEventListener(\n          \"keypress\", (e) => e.key === \"f\"\n          ? window.location.assign(\"/archive\")\n          : null);\n      </script></body></html>",
  "id": "7fbcc30c-744b-5822-bbf6-43e7d78ef95c",
  "modified": "2026-05-28T13:06:17Z",
  "revisions": [
    {
      "authorEmail": "mail@nikhil.io",
      "authorName": "Nikhil Anand",
      "date": "2026-05-28T13:06:17Z",
      "id": "3a9b818523545d308311a0ec6800815045e5dd3e",
      "shortId": "3a9b8185",
      "subject": "Formatting fixes -- Claude\n",
      "content": "## When things are OK\n\n```bash\n# Simply remove and install the package  \nyum -y remove PACKAGE  \nyum -y install PACKAGE\n```\n\n## When things get bad\n\n```bash\n# Use rpm to force removal and reinstall with yum  \nrpm -e --nodeps PACKAGE  \nyum -y install PACKAGE\n```\n\n## When things go very South\n\n```bash\n# Trick yum into thinking that the package  \n# doesn't exist in the RPM database  \nrpm -e --nodeps --justdb PACKAGE  \nyum install PACKAGE\n```\n\nN.B. The last method doesn't actually remove any files.\n\n## Other notes\n\nFiles staged for install when performing a `yum update` are kept in `/var/cache/yum/`. This is useful in [certain situations](http://fir3net.com/Redhat-/-Fedora/yum-update-shows-module-object-has-no-attribute-httpshandler-error.html).\n"
    },
    {
      "authorEmail": "mail@nikhil.io",
      "authorName": "Nikhil Anand",
      "date": "2026-01-13T18:47:28Z",
      "id": "2436477560f26e23d00a24add1cbfeafdca4af78",
      "shortId": "24364775",
      "subject": "No compression\n",
      "content": "When things are OK\n------------------\n\n```bash\n# Simply remove and install the package  \nyum -y remove PACKAGE  \nyum -y install PACKAGE\n```\n\nWhen things get bad\n-------------------\n\n```bash\n# Use rpm to force removal and reinstall with yum  \nrpm -e --nodeps PACKAGE  \nyum -y install PACKAGE\n```\n\nWhen things go very South\n-------------------------\n\n```bash\n# Trick yum into thinking that the package  \n# doesn't exist in the RPM database  \nrpm -e --nodeps --justdb PACKAGE  \nyum install PACKAGE\n```\n\nN.B. The last method doesn't actually remove any files.\n\nOther notes\n-----------\n\nFiles staged for install when performing a `yum update` are kept in\n`/var/cache/yum/`. This is useful in [certain situations](http://fir3net.com/Redhat-/-Fedora/yum-update-shows-module-object-has-no-attribute-httpshandler-error.html).\n"
    },
    {
      "authorEmail": "mail@nikhil.io",
      "authorName": "Nikhil Anand",
      "date": "2015-12-27T07:27:56Z",
      "id": "1aa29105a45aa67523ffb61e73bcc415f935a47e",
      "shortId": "1aa29105",
      "subject": "Fix Markdown conversion\n\nSaw half a season of The Office\n",
      "content": "When things are OK\n------------------\n\n```bash\n# Simply remove and install the package  \nyum -y remove PACKAGE  \nyum -y install PACKAGE\n```\n\nWhen things get bad\n-------------------\n\n```bash\n# Use rpm to force removal and reinstall with yum  \nrpm -e --nodeps PACKAGE  \nyum -y install PACKAGE\n```\n\nWhen things go very South\n-------------------------\n\n```bash\n# Trick yum into thinking that the package  \n# doesn't exist in the RPM database  \nrpm -e --nodeps --justdb PACKAGE  \nyum install PACKAGE\n```\n\nN.B. The last method doesn't actually remove any files.\n\nOther notes\n-----------\n\nFiles staged for install when performing a `yum update` are kept in\n`/var/cache/yum/`. This is useful in [certain situations](http://fir3net.com/Redhat-/-Fedora/yum-update-shows-module-object-has-no-attribute-httpshandler-error.html).\n"
    },
    {
      "authorEmail": "mail@nikhil.io",
      "authorName": "Nikhil Anand",
      "date": "2015-12-21T02:30:47Z",
      "id": "d658e80d1ecb97b196531c7b15a0f9af709c05de",
      "shortId": "d658e80d",
      "subject": "Incremental\n",
      "content": "When things are OK\n------------------\n\n` # Simply remove and install the package`  \n` yum -y remove PACKAGE`  \n` yum -y install PACKAGE`\n\nWhen things get bad\n-------------------\n\n` # Use rpm to force removal and reinstall with yum`  \n` rpm -e --nodeps PACKAGE`  \n` yum -y install PACKAGE`\n\nWhen things go very South\n-------------------------\n\n` # Trick yum into thinking that the package`  \n` # doesn't exist in the RPM database`  \n` rpm -e --nodeps --justdb PACKAGE`  \n` yum install PACKAGE`\n\nN.B. The last method doesn't actually remove any files.\n\nOther notes\n-----------\n\nFiles staged for install when performing a `yum update` are kept in\n`/var/cache/yum/`. This is useful in [certain\nsituations](http://fir3net.com/Redhat-/-Fedora/yum-update-shows-module-object-has-no-attribute-httpshandler-error.html).\n\n\n\n"
    },
    {
      "authorEmail": "mail@nikhil.io",
      "authorName": "Nikhil Anand",
      "date": "2015-12-20T19:56:48Z",
      "id": "8f36ec1a73240ae8efdd951099b95a0c1edc0d59",
      "shortId": "8f36ec1a",
      "subject": "Forcing yum to reinstall a package : First Draft\n",
      "content": "When things are OK\n------------------\n\n` # Simply remove and install the package`  \n` yum -y remove PACKAGE`  \n` yum -y install PACKAGE`\n\nWhen things get bad\n-------------------\n\n` # Use rpm to force removal and reinstall with yum`  \n` rpm -e --nodeps PACKAGE`  \n` yum -y install PACKAGE`\n\nWhen things go very South\n-------------------------\n\n` # Trick yum into thinking that the package`  \n` # doesn't exist in the RPM database`  \n` rpm -e --nodeps --justdb PACKAGE`  \n` yum install PACKAGE`\n\nN.B. The last method doesn't actually remove any files.\n\nOther notes\n-----------\n\nFiles staged for install when performing a `yum update` are kept in\n`/var/cache/yum/`. This is useful in [certain\nsituations](http://fir3net.com/Redhat-/-Fedora/yum-update-shows-module-object-has-no-attribute-httpshandler-error.html).\n\n[Category:Nikhil's Notes](Category:Nikhil's_Notes \"wikilink\")\n[Category:From a past sysadmin\nlife](Category:From_a_past_sysadmin_life \"wikilink\")\n"
    }
  ],
  "sizeInBytes": 798,
  "source": "## When things are OK\n\n```bash\n# Simply remove and install the package  \nyum -y remove PACKAGE  \nyum -y install PACKAGE\n```\n\n## When things get bad\n\n```bash\n# Use rpm to force removal and reinstall with yum  \nrpm -e --nodeps PACKAGE  \nyum -y install PACKAGE\n```\n\n## When things go very South\n\n```bash\n# Trick yum into thinking that the package  \n# doesn't exist in the RPM database  \nrpm -e --nodeps --justdb PACKAGE  \nyum install PACKAGE\n```\n\nN.B. The last method doesn't actually remove any files.\n\n## Other notes\n\nFiles staged for install when performing a `yum update` are kept in `/var/cache/yum/`. This is useful in [certain situations](http://fir3net.com/Redhat-/-Fedora/yum-update-shows-module-object-has-no-attribute-httpshandler-error.html).\n",
  "title": "Forcing yum to reinstall a package",
  "untracked": false,
  "uri": "/Forcing_yum_to_reinstall_a_package",
  "relativePath": "Forcing yum to reinstall a package.md"
}
