Posted: . At: 7:43 PM. This was 4 years ago. Post ID: 14553
Page permalink. WordPress uses cookies, or tiny pieces of information stored on your computer, to verify who you are. There are cookies for logged in users and for commenters.
These cookies expire two weeks after they are set.


How to extract an RPM file on Ubuntu very easily. This is a fun trick.


Red Hat Linux used the Red Hat Package Manager format to package various files and programs. But this can be opened very easily on Ubuntu. The rpm2archive utility will convert these files into a *.tgz file. This may then be easily extracted on Linux.

Use this utility to convert a Red Hat RPM to a compressed tarball.

jason@jason-desktop:~/Downloads$ rpm2archive "desktop-backgrounds-1.1-1.noarch(1).rpm"

Then extract the tarball to access the contents.

jason@jason-desktop:~/Downloads$ tar -xvf "desktop-backgrounds-1.1-1.noarch(1).rpm.tgz"

Then the contents will be placed in the current directory.

Then use a simple command to list all directories extracted from the archive.

jason@jason-desktop:~/Downloads$ ls -lDR usr/ | grep ':$'
  usr/:
  usr/doc:
  usr/doc/desktop-backgrounds-1.1:
  usr/share:
  usr/share/pixmaps:
  usr/share/pixmaps/backgrounds:
  usr/share/pixmaps/backgrounds/Propaganda:
  usr/share/pixmaps/backgrounds/Propaganda/Vol1:
  usr/share/pixmaps/backgrounds/Propaganda/Vol2:
  usr/share/pixmaps/backgrounds/Propaganda/Vol3:
  usr/share/pixmaps/backgrounds/Propaganda/Vol4:
  usr/share/pixmaps/backgrounds/Propaganda/Vol5:
  usr/share/pixmaps/backgrounds/Propaganda/Vol6:
  usr/share/pixmaps/backgrounds/space:
  usr/share/pixmaps/backgrounds/tiles:

The alien utility may also be used to convert an RPM into a Debian *.deb package for installation, but for such an old package, it was not worth the effort. Better to just extract the files I need to use.


Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.