{ "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": "\n\n \n \n \n \n \n \n \n \n \n \n \n Forcing yum to reinstall a package – Nikhil's Personal Wiki\n \n \n \n \n \n
\n
\n \n
\n
\n \n \n\n

Forcing yum to reinstall a package\n \n

\n

When things are OK

\n
# Simply remove and install the package  \nyum -y remove PACKAGE  \nyum -y install PACKAGE\n

When things get bad

\n
# Use rpm to force removal and reinstall with yum  \nrpm -e --nodeps PACKAGE  \nyum -y install PACKAGE\n

When things go very South

\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.B. The last method doesn’t actually remove any files.

\n

Other notes

\n

Files staged for install when performing a yum update are kept in
\n/var/cache/yum/. This is useful in certain situations.

\n\n\n
\n \n
\n \n \n \n \n \n\n", "id": "7fbcc30c-744b-5822-bbf6-43e7d78ef95c", "modified": "2024-04-15T23:13:03Z", "revisions": [ { "authorEmail": "mail@nikhil.io", "authorName": "Nikhil Anand", "date": "2024-04-15T23:13:03Z", "id": "1f343266dce411121f0cff3ca7e3e0632be6ce97", "shortId": "1f343266", "subject": "Some more notes\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": "5a5b1a32f41081d062ab86f8869a961bcad79668", "shortId": "5a5b1a32", "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": "3f2c54b1d767218fcb4855fbac306b015afaf551", "shortId": "3f2c54b1", "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": "8c4612b8dc97470e7be3fce7a255d3e5b88e8aa6", "shortId": "8c4612b8", "subject": "Forcing yum to reinstall a package : First Draft", "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": 863, "source": "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", "title": "Forcing yum to reinstall a package", "untracked": false, "uri": "/Forcing_yum_to_reinstall_a_package", "relativePath": "Forcing yum to reinstall a package.md" }