RPM -e for single architecture

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



David Thompson wrote:
> On architectures where multiple architectures for an RPM may be simultaneously 
> installed (my example is x86_64), does anyone know the RPM magic to remove 
> only one version?

Add a line like this to your .rpmmacros

%_query_all_fmt %%{name}-%%{version}-%%{release}.%%{arch}

rpm will then show each pkg with the arch appended ( as yum does ), and
you can run specific rpm ops on these pkgs with {name}.{arch}

> For instance, if I have the x86_64 and i386 versions of an RPM
> installed, how I can specify to only remove the i386 version?

eg:

[kbsingh@centos ~]$ rpm -q glibc
glibc-2.3.4-2.8.i386
glibc-2.3.4-2.8.x86_64

you should be able to 'rpm -e glibc.i386' to erase the .i386 pkg only.

also, "yum erase glibc.i386" would achieve pretty much the same thing.

- KB

-- 
Karanbir Singh   : http://www.karan.org/
GnuPG Public Key : http://www.karan.org/publickey.asc

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux