Translations: English - Русский
RPM Package Manager
The RPM was developed at RedHat for keeping track of the files each program or package installed as well as noting what other packages it depended on or depended on it, some information about the source of the package and a brief synopsis.
One should avoid using .rpm package on a Debian system.
There are some good (and more not so good) write-ups comparing the two package management systems. A search for rpm vs deb or rpm vs dpkg will turn them up. todo add some url's for some good ones
Why would anyone want to use the RPM within Debian?
- Binary package
If the package only comes in binary .rpm format, you can use alien to convert it.
- Source Package
In order to extract sources from an rpm archive, it may be necessary to use the rpm tool.
A developer may want to extract package source code that is only available within an rpm archive.
rpm to dpkg/apt command reference
This guide may help people switching to a dpkg based distribution like Debian from an RPM based one like RedHat.
A quick comparison of rpm and apt/dpkg command-line arguments
List all installed packages:
rpm -qa dpkg --list
List information about an installed package:
rpm -qi pkgname dpkg --status pkgname (prints a bunch of extra info too)
List files in an installed package
rpm -ql pkgname dpkg --listfiles pkgname
List information about a package on the local hard drive
rpm -qpi file.rpm dpkg --info file.deb
List files in a package on the local hard drive
rpm -qpl file.rpm dpkg --contents file.deb
List files in an uninstalled package (depends on dist)
- grep through the Contents.arch file found in ftp.us.debian.org/debian/dists/frozen/
Extract files in a package without installing it
(Open it in Midnight Commander (mc) and then enter CONTENTS.cpio(1))
dpkg-deb --extract file.deb dir-to-extract-to
- or Midnight Commander works on .debs too.
Install a package from a local file
rpm -i file.rpm dpkg --install file.deb
Remove a package from the system
rpm -E pkgname (removes everything) dpkg --purge pkgname (removes everything) dpkg --remove pkgname (leaves config files behind)
Identify the package that owns a file
rpm -qf full-path-to file rpm -qf name-of-file-in-local-dir dpkg --search any-portion-of-file's-path (2)
Get information about a remote package
rpm -qpi <url> apt-cache show package
List all remote packages
(browse rpmfind.net or your other site) apt-cache dumpavail
(1) thanks to Adriaan Penning
(2) i.e. "dpkg --search /etc" will display all packages that have files in etc.
Derived from a page by Scott Bronson at http://www.trestle.com/linux/rpmdeb.html
see also :
https://wikitech.leuksman.com/view/OS_differences : Sysadmin cheat sheet
Redhat Package Manager (RPM)
RPM was originally designed to be a standalone binary installer for Redhat based GNU/Linux distros (Like Fedora, Mandrake and SUSE). RPM has since been ported to other operating systems such as IBM's AIX and Novell Netware.
Install a .RPM in Debian
To install a .rpm file in a Debian based system you'll need the program Alien. Note that Alien can't work 100% of the time, because rpm and apt are very different.