We are automating some deploy scripts which uninstall/install RPMs. I've seen on more than one of our hosts that rpm -qa returns something like:
# rpm -qa | grep tcl
tcl-8.5.7-6.el6.x86_64
tcl-8.5.7-6.el6.x86_64
tcl-8.5.7-6.el6.x86_64
tcl-8.5.7-6.el6.x86_64
tcl-8.5.7-6.el6.x86_64
tcl-8.5.7-6.el6.x86_64
How does this happen using rpm -e and rpm -i? And is there a way to prevent this? If I run rpm -e in this case, I get
# rpm -e tcl-8.5.7-6.el6
error: "tcl-8.5.7-6.el6" specifies multiple packages:
tcl-8.5.7-6.el6.x86_64
tcl-8.5.7-6.el6.x86_64
tcl-8.5.7-6.el6.x86_64
tcl-8.5.7-6.el6.x86_64
tcl-8.5.7-6.el6.x86_64
tcl-8.5.7-6.el6.x86_64
So I had to use the -vv --allmatches --nodeps --noscripts --notriggers
switches