RPM Quick Reference: Difference between revisions
From MediaWiki
Jump to navigationJump to search
(How to find the architecture of a RPM package) |
(How to remove i386 packages from a x86_64 machine) |
||
Line 186: | Line 186: | ||
VERSION | VERSION | ||
XPM | XPM | ||
</pre> | |||
<div class="userInput"><span class="prompt">[root@taco ~]# </span></div> | |||
</div> | |||
== Removing i386 Packages == | |||
Paul has found the following command useful for removing the '''i386''' - '''i686''' compatibility packages from a '''x86_64''' (64 bit) development machine: | |||
<div class="screen"> | |||
<div class="screenTitle">Removing i386 Compatibility Packages</div> | |||
<div class="userInput"><span class="prompt">[root@taco ~]# </span>rpm --erase $(rpm --queryformat '%{name}-%{version}-%{release}.%{arch}\n' -qa | grep i[3-6]86)</div> | |||
<pre class="computerOutput"> | |||
</pre> | </pre> | ||
<div class="userInput"><span class="prompt">[root@taco ~]# </span></div> | <div class="userInput"><span class="prompt">[root@taco ~]# </span></div> | ||
</div> | </div> |
Revision as of 14:32, 23 May 2007
Showing the Architecture
It is not easy to determine a RPM package architecture using the rpm command. You need to create a custom RPM format to see this information.
Using --queryformat to Show Architecture
[root@taco ~]# rpm -q --queryformat "%{NAME}-%{VERSION}.%{ARCH}\n" coreutils
coreutils-5.97.i386
[root@taco ~]# rpm -q --queryformat "%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n" kernel
kernel-2.6.20-1.2933.fc6.i686 kernel-2.6.20-1.2944.fc6.i686
[root@taco ~]#
The --queryformat FORMAT option is a powerful feature included with the RPM toolset. For details on the various format specifiers, see: "http://www.rpm.org/max-rpm/ch-queryformat-tags.html", or run the following command:
Using --querytags to Show --queryformat Options
[root@taco ~]# rpm --querytags | sort
ARCH ARCHIVESIZE BASENAMES BUILDARCHS BUILDHOST BUILDTIME C CACHECTIME CACHEPKGMTIME CACHEPKGPATH CACHEPKGSIZE CHANGELOGNAME CHANGELOGTEXT CHANGELOGTIME CLASSDICT CONFLICTFLAGS CONFLICTNAME CONFLICTS CONFLICTVERSION COOKIE COPYRIGHT CVSID D DEPENDSDICT DESCRIPTION DIRINDEXES DIRNAMES DISTRIBUTION DISTTAG DISTURL DSAHEADER E ENHANCESFLAGS ENHANCESNAME ENHANCESVERSION EPOCH EXCLUDEARCH EXCLUDEOS EXCLUSIVEARCH EXCLUSIVEOS FILECLASS FILECOLORS FILECONTEXTS FILEDEPENDSN FILEDEPENDSX FILEDEVICES FILEFLAGS FILEGROUPNAME FILEINODES FILELANGS FILELINKTOS FILEMD5S FILEMODES FILEMTIMES FILENAMES FILEPROVIDE FILERDEVS FILEREQUIRE FILESIZES FILESTATES FILEUSERNAME FILEVERIFYFLAGS FSCONTEXTS FSNAMES FSSIZES GIF GROUP HDRID HEADERI18NTABLE HEADERIMAGE HEADERIMMUTABLE HEADERREGIONS HEADERSIGNATURES ICON INSTALLCOLOR INSTALLPREFIX INSTALLTID INSTALLTIME INSTPREFIXES LICENSE N NAME O OBSOLETEFLAGS OBSOLETENAME OBSOLETES OBSOLETEVERSION OLDFILENAMES OPTFLAGS OS P PACKAGER PATCH PATCHESFLAGS PATCHESNAME PATCHESVERSION PAYLOADCOMPRESSOR PAYLOADFLAGS PAYLOADFORMAT PKGID PLATFORM POLICIES POSTIN POSTINPROG POSTTRANS POSTTRANSPROG POSTUN POSTUNPROG PREFIXES PREIN PREINPROG PRETRANS PRETRANSPROG PREUN PREUNPROG PRIORITY PROVIDEFLAGS PROVIDENAME PROVIDES PROVIDEVERSION PUBKEYS R RECONTEXTS RELEASE REMOVETID REQUIREFLAGS REQUIRENAME REQUIRES REQUIREVERSION RHNPLATFORM RPMVERSION RSAHEADER SERIAL SHA1HEADER SIGGPG SIGMD5 SIGPGP SIGSIZE SIZE SOURCE SOURCEPACKAGE SOURCEPKGID SOURCERPM SUGGESTSFLAGS SUGGESTSNAME SUGGESTSVERSION SUMMARY SVNID TRIGGERCONDS TRIGGERFLAGS TRIGGERINDEX TRIGGERNAME TRIGGERSCRIPTPROG TRIGGERSCRIPTS TRIGGERTYPE TRIGGERVERSION URL V VENDOR VERIFYSCRIPT VERIFYSCRIPTPROG VERSION XPM
[root@taco ~]#
Removing i386 Packages
Paul has found the following command useful for removing the i386 - i686 compatibility packages from a x86_64 (64 bit) development machine:
Removing i386 Compatibility Packages
[root@taco ~]# rpm --erase $(rpm --queryformat '%{name}-%{version}-%{release}.%{arch}\n' -qa | grep i[3-6]86)
[root@taco ~]#