`
iwindyforest
  • 浏览: 235102 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论

remove duplicates for yum check

 
阅读更多

 

 

Apparently, when doing "yum update ", and it fails miserably, you can end up with duplicate versions of packages in the RPM database. This seems harmless, but is annoying. yum provides a tool to check for this, but I was not able to find anything that would automatically repair it. So here's a little tip:

$ yum check duplicates | awk '/is a duplicate/ {print $6}' > /tmp/DUPES
$ yum remove `cat /tmp/DUPES`

 Of course, before you remove the dupes, make sure to examine the tmp file (/tmp/DUPES) and make sure it looks ok.

Update:

There seems to be a command to do this, package-cleanup has an option for it. E.g.

$ package-cleanup --cleandupes

However, testing this command on a second box having the same problem gave bad results, it seems to have uninstalled the "real" packages too.

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics