How to extract .deb or .rpm in Linux

The best and the easier way to extract .deb files to Linux is to download
the alien binary package and convert the .deb file to rpm and make your life

  1. download
  2. tar -zxvf alien_8.66.tar.gz
  3. su root
  4. perl
  5. make
  6. make install
  7. alien -r file.deb (extract the .deb file to rpm file)
  8. rpm -i file.rpm (install the rpm file nice and easy)
  9. or vice versa
  10. alien -k file.rpm (extract the .rpm file to .deb file)
  11. dpkg-deb -x file.deb (install the deb file nice and easy)



5 thoughts on “How to extract .deb or .rpm in Linux

  1. fast_rizwaan says:

    To extract the deb file in the current folder:

    dpkg-deb -x file.deb . [observe the ‘.’ dot]
    dpkg-deb -x file.deb $HOME (will extract in your home folder)

  2. Mike M says:

    I came across this page because I just wanted to access the files in a deb rather than install it (the deb contained source files and i’m using gentoo). This page didn’t have the answer I was looking for. I enclose my answer here in case other come here looking for what I want.

    from wikipedia article:

    “Since Debian 0.93, a deb file is implemented as an ar archive. Canonical contents of this archive are three files:

    * debian-binary: deb format version number. This is “2.0” for current versions of Debian.
    * control.tar.gz: all package meta-information.
    * data.tar or data.tar.gz or data.tar.bz2 or data.tar.lzma: the actual installable files.

    i found I already had ar installed so I could just do:
    ar x file.deb
    tar -zxvf data.tar.gz

  3. govath says:

    Yes mate, you can make a deb archive without dpkg with the ar command.
    The ar program creates, modifies, and extracts from archives.

    Thank you Mike M for your comment!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s