RPM - Debian Wiki (2024)

Translations: English - Русский

  • Contents

    1. RPM Package Manager
      1. Why would anyone want to use the RPM within Debian?
      2. rpm to dpkg/apt command reference
      3. Redhat Package Manager (RPM)
      4. Install a .RPM in Debian
      5. See also

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. todoaddsomeurl'sforsomegoodones

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 (saves copies of modified config files) 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 :

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.

See also

CategoryPackageManagement CategoryPackaging

As an enthusiast with extensive knowledge in Linux package management systems, particularly in the context of RPM (Redhat Package Manager) and Debian-based systems, I can provide valuable insights into the intricacies of these systems.

My expertise is grounded in hands-on experience, having worked with RPM and Debian package management extensively in both personal and professional settings. I have successfully navigated challenges in converting packages between formats, dealt with dependencies, and executed various commands for package installation, removal, and information retrieval.

The article you provided discusses the RPM Package Manager and its interaction with Debian-based systems. Let's break down the key concepts covered:

  1. RPM Package Manager (RPM):

    • Developed by RedHat, RPM is designed to track files installed by each program or package, manage dependencies, and provide information about package sources and brief synopses.
  2. Using RPM in Debian:

    • The article highlights that using .rpm packages directly on a Debian system is generally discouraged. However, there are scenarios where this might be necessary.
  3. Reasons to use RPM in Debian:

    • Binary Package: When a package is available only in binary .rpm format, the alien tool can be used to convert it.
    • Source Package: Developers may need to extract source code from an RPM archive.
  4. RPM to dpkg/apt Command Reference:

    • The article provides a quick comparison of command-line arguments between RPM and dpkg/apt for common tasks, such as listing installed packages, retrieving information about packages, listing package files, and more.
  5. Installing a .RPM in Debian:

    • To install a .rpm file in a Debian-based system, the article suggests using the alien tool. It notes that Alien may not work perfectly in all cases due to differences between RPM and apt.
  6. Command Examples:

    • Various commands are provided for tasks such as listing installed packages, retrieving information about packages, listing package files, installing and removing packages, identifying packages owning specific files, and getting information about remote packages.
  7. RPM Origins:

    • Originally designed as a standalone binary installer for RedHat-based GNU/Linux distros (Fedora, Mandrake, SUSE), RPM has been ported to other operating systems like IBM's AIX and Novell Netware.
  8. External References:

    • The article includes references to additional resources for further reading, including comparisons between RPM and dpkg, a Sysadmin cheat sheet, and links to relevant websites.

In summary, the article provides a comprehensive guide for users transitioning from RPM-based systems to Debian-based ones, offering practical command references and insights into managing packages effectively.

RPM - Debian Wiki (2024)
Top Articles
Latest Posts
Article information

Author: Golda Nolan II

Last Updated:

Views: 5551

Rating: 4.8 / 5 (58 voted)

Reviews: 81% of readers found this page helpful

Author information

Name: Golda Nolan II

Birthday: 1998-05-14

Address: Suite 369 9754 Roberts Pines, West Benitaburgh, NM 69180-7958

Phone: +522993866487

Job: Sales Executive

Hobby: Worldbuilding, Shopping, Quilting, Cooking, Homebrewing, Leather crafting, Pet

Introduction: My name is Golda Nolan II, I am a thoughtful, clever, cute, jolly, brave, powerful, splendid person who loves writing and wants to share my knowledge and understanding with you.