CentOS下Oracle Instant Client卸载异常求助:yum显示已安装但rpm无法移除
Hey there, I’ve run into this exact kind of discrepancy between yum and rpm before—super frustrating when one tool says the package is there and the other swears it isn’t! Let’s walk through the steps to get rid of that stubborn package:
First, get the exact, full package name
It’s easy to mistype or use a truncated package name withrpm -e, which is probably why it’s failing. Run this command to grab the precise name yum sees:yum list installed | grep -i oracleYou’ll get something like
oracle-instantclient19.3-basic-19.3.0.0.0-1.x86_64—copy that full string, it’s crucial for the next steps.Use yum directly to uninstall the package
Instead of fighting withrpm, let yum handle it—it’s designed to sync with the rpm database and resolve these kinds of mismatches. Run:yum remove <full-package-name-you-copied>Confirm the prompt, and yum should take care of removing it properly.
If yum still acts up, clean its cache and rebuild the rpm database
Sometimes yum’s cached data gets out of sync with the actual rpm state. Fix that with:yum clean all rpm --rebuilddbAfter running these, recheck the installed packages with
yum list installed | grep -i oracle—if the package still shows up, try theyum removecommand again.Double-check for leftover packages
There might be multiple related Oracle Instant Client packages (like devel, sqlplus, etc.). Make sure you’re removing all of them if needed—repeat the grep and remove steps for any other oracle-related packages listed.
内容的提问来源于stack exchange,提问作者alex8276

