Linux

rpm command cheatsheet

This is a simple cheatsheet for the rpm command and can be used on systems like RedHat that uses the command Syntax Description Example(s) rpm -ivh {rpm-file} Install the package rpm -ivh sendmail-cf-8.14.2-1.fc8.rpm rpm -ivh –test sendmail-8.14.2-1.fc8.rpm rpm -Uvh {rpm-file} Upgrade package rpm -Uvh sendmail-cf-8.14.2-1.fc8.rpm rpm -Uvh –test sendmail-8.14.2-1.fc8.rpm rpm -ev {package} Erase/remove/ an installed […]

Read More
Linux

List rpm package content

To list the contents of a package just run the command # rpm -ql packagename Example # rpm -ql nmap /usr/bin/nmap /usr/share/doc/nmap-3.70 /usr/share/doc/nmap-3.70/COPYING /usr/share/doc/nmap-3.70/COPYING.OpenSSL /usr/share/doc/nmap-3.70/README /usr/share/doc/nmap-3.70/nmap-fingerprinting-article.txt /usr/share/doc/nmap-3.70/nmap.deprecated.txt /usr/share/doc/nmap-3.70/nmap.usage.txt /usr/share/doc/nmap-3.70/nmap_doc.html /usr/share/doc/nmap-3.70/nmap_manpage.html /usr/share/man/man1/nmap.1.gz /usr/share/nmap /usr/share/nmap/nmap-mac-prefixes /usr/share/nmap/nmap-os-fingerprints /usr/share/nmap/nmap-protocols /usr/share/nmap/nmap-rpc /usr/share/nmap/nmap-service-probes /usr/share/nmap/nmap-services

Read More
Linux

Upgrade from Fedora Core 7 to Core 8

This is the steps I took to upgrade a running Fedora Core 7 installation to Core 8 using yum from the command line. Please note that live upgrades are not recommended by the Fedora Project. Make a list of the systems current packages for later reference: rpm -qa –qf ‘%{NAME}\n’ | sort | uniq > […]

Read More
Linux

Query RPM database/packages and list their architecture

If you use the –queryformat argument with rpm it is possible to query RPMs for different architectures installed# rpm -qa –queryformat %{NAME}-%{VERSION}-%{ARCH}\\n | grep dbus-glib | sortResultdbus-glib-0.22-12.EL.5-i386dbus-glib-0.22-12.EL.5-x86_64This can also be used in one of my previous posts: Remove duplicate packages when querying the rpm database.

Read More
Linux

Remove duplicate packages when querying the rpm database

Today I had to solve a RPM problem on a Red Hat Enterprise Linux WS release 4 (Nahant Update 6) system (RHEL4) where there were duplicate packages when querying the rpm database. This had happened after an upgrade to update 6 using up2date from the command line. It seemed like i386 and x64 packages had […]

Read More