Converting deb files in Ubuntu

Different Linux distributions package up software in different ways. RedHat uses .rpm files, while Debian and Ubuntu use .deb files. To convert a .rpm to a .deb file, you can use the alien program:

alien -k package.rpm

The -k option preserves the minor version number of a package (don’t worry about it, just do it or read the man page).

Installing a package in Debian or Ubuntu is also easy. To install a .deb file, you can type:

sudo dpkg -i packagename.deb

To uninstall a package, use

sudo dpkg -r packagename

12 Responses to Converting deb files in Ubuntu (Leave a comment)

  1. I should add that alien works on a good ‘ol “college try” and doesn’t always work smoothly. It is definitely worth a shot though before you try compiling from source. The good thing is that Ubuntu has a HUGE package repository so in most cases you can get the package you need.

  2. Great info., can we get access to the “1750+ little files” now Matt?

    Thanks 😉

  3. Aaron, I’d have to check each one to see if it was confidential or not, which sounds like a tiny little microcosm of hell to me. 🙂 But I may review the directory to see if I can cherry pick a few of the good ones.

    Oh. I wonder if I can get usage stats to see which files are accessed the most? Hmm…

  4. 2 Matt> may be you can try this simple howto:

    grep -L –recursive “google” *

    🙂

  5. Hey Matt,
    You forgot about .tgz packages that Slack uses 🙂

    rpm2tgz will do the trick.

    Laterss

  6. Have you ever used Ubuntu on a laptop? I am thinking about moving my Sony Viao over and wanted to know if I was in for a bunch of headaches.

  7. Very good article … Can I translate this article and insert on my site in Poland? … Thanks 🙂

  8. Ubuntu on my Sony Vaio works a treat, its a A115B. No problems to report yet, it has been on for about 6 month. It also hibernates without spending days playing about with the kernel!!

  9. AG

    Actually, you really don’t need ‘alien’.
    It is possible to extract the contents of a .deb file by using ‘ar’:
    For instance..

    $ ar t libstdc++6_4.1-0exp6_i386.deb
    debian-binary
    control.tar.gz
    data.tar.gz

    The file metadata is contained in control.tar.gz.
    Important bits are found in data.tar.gz (it’s contents can be copied to /.)

    Common commands:
    ar t
    Display table of contents for the archive.

    ar x
    Extract archive member from the specified ar file.

    ar p
    Print the archive member to stdout from the specified ar file.

  10. Ars

    lol, and I torture myself a year ago with those things for about one week.

  11. C Phillips

    I have found “GDebi package installer” to be easier than opening a terminal. Also, when installing Debs I just simply click to download, then “choose open with”-and scroll down to “GDeb” in the download options. I find that if there are further un-met dependencies it will prompt me to install them too. This way I usually get all the dependencies met also. Try it. It’s easy

css.php