Converting between Linux package formats with “alien”

So let’s say I’m working on my box, which is running Ubuntu, a Debian-based distro, and I come across some nifty piece of software which is available in RPM format, but not in DEB format. What to do?

Use a nifty Perl program called alien (Wikipedia link).

With no options, it will convert that RPM package into a DEB package, installable with dpkg. If you want to go old school, you can use the -t option to convert the RPM into a good old .tar.gz file.

This is just one particular use. Alien can do a lot of other conversions as well.

2 thoughts on “Converting between Linux package formats with “alien”

  1. Ahh, but what about going back the other way without using Alien? That is converting that .deb to a neat tarball. One of my buddies showed me this nifty trick…

    Using the ‘ar’ archiver you can do the following:
    ar x name_of_debian_package.tar.gz
    tar xvzf data.tar.gz

    When you use ‘ar’, you’ll get two files (1)control.tar.gz file, (2)data.tar.gz. The archive you created will be contained in data.tar.gz. which is meant to be extracted at root. The contol.tar.gz is the package metadata.

    Unfortunately, the manpage is sorely lacking…
    ar –help is useful 😉

Leave a Reply

Your email address will not be published. Required fields are marked *