我的 yum 中有 2 个软件包我想删除。当我列出已安装的软件包时,它们出现在输出中,当我尝试删除它们时,yum 似乎认为没问题并继续删除。但是,它们永远不会消失,它们留在列表中,我可以删除它们 42 次,什么也没发生。没有错误消息。我尝试使用以下命令重建 rpm 数据库:
rm -rf /var/lib/rpm/__db.00* rpm --rebuilddb
但这并没有什么帮助。例如:
$ yum erase eclipse-ecj.x86_64
Loaded plugins: fastestmirror
Setting up Remove Process
Resolving Dependencies
--> Running transaction check
---> Package eclipse-ecj.x86_64 1:3.2.1-19.el5.centos set to be erased
--> Finished Dependency Resolution
Dependencies Resolved
=====================================================================================================
Package Arch Version Repository Size
=====================================================================================================
Removing:
eclipse-ecj x86_64 1:3.2.1-19.el5.centos installed 23 M
Transaction Summary
=====================================================================================================
Remove 1 Package(s)
Reinstall 0 Package(s)
Downgrade 0 Package(s)
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Erasing : eclipse-ecj 1/1
Removed:
eclipse-ecj.x86_64 1:3.2.1-19.el5.centos
Complete!
$ yum erase eclipse-ecj.x86_64
Loaded plugins: fastestmirror
Setting up Remove Process
Resolving Dependencies
--> Running transaction check
---> Package eclipse-ecj.x86_64 1:3.2.1-19.el5.centos set to be erased
--> Finished Dependency Resolution
Dependencies Resolved
=====================================================================================================
Package Arch Version Repository Size
=====================================================================================================
Removing:
eclipse-ecj x86_64 1:3.2.1-19.el5.centos installed 23 M
Transaction Summary
=====================================================================================================
Remove 1 Package(s)
Reinstall 0 Package(s)
Downgrade 0 Package(s)
Is this ok [y/N]:
帮助!
答案1
我从上面的评论中看到 postun 脚本失败了。您可以使用以下命令删除它而不触发脚本:
rpm -e --noscripts eclipse-ecj
答案2
尝试“rpm -e --nodeps PACKAGENAME” - 然后跟上“yum clean all; yum check”,看看是否得到任何有趣的输出。如果没有输出,您应该会发现包现在已经消失了。如果是这样,那么您需要从那里继续。