RPM remove error: specifies multiple packages

You may receive an error message “error: packagename specifies multiple packages” while removing a package with “rpm -e package-name”, for example:

# rpm -e mysql-devel
error: "mysql-devel" specifies multiple packages

This is because the packages of both the architectures (32 and 64 bit) are installed  on the server i.e.

mysql-devel.i386
mysql-devel.x86_64

CentOS, Fedora will list the duplicate packages when you query them using RPM. It won’t list the architecture i.e.

# rpm -qa mysql-devel
mysql-devel
mysql-devel

To list the packages along with their architecture, use the –queryformat option while querying the package,

# rpm -q --queryformat "%{name}.%{arch}\n" mysql-devel
mysql-devel.i386
mysql-devel.x86_64

Now, remove the package you wish to, for example 32 bit package:

# rpm -e mysql-devel.i386
This entry was posted on Friday, November 18th, 2011 and is filed under Linux Administration. You can follow any responses to this entry through the RSS 2.0 feed. Both comments and pings are currently closed.

Comments are closed.