08. Converting between package formats alien

There are times you need to convert among tarbells, .rpm, and .deb. Not all software and packages are available on both platforms, so this is not uncommon. The command line tool that gets this done is the alien.


The alien program requires that you have both RPM and Debian package manager to convert between formats. Thus, install both using the appropriate yum or apt-get commands.

# apt-get install alien
# yum install alien


The syntax for alien is as follows:

$ alien [options] file[...]


Here are some of the commonly used options with alien.

Convert the specified package to Debian. This option is the default.
Convert to RPM.
Convert for Stampede Linux.
Convert to a Slackware tgz package.
Installs the converted package, then removes it.
Keep the version number of the generated package.
Verbose mode: display each command.

Converting rpm to deb and vice versa

As mentioned above, converting to .deb files is the default option.

# Converting to .deb
# alien packagename.rpm # Converting to rpm
# alien -r packagename.deb

Want to avoid becoming a code monkey?

Clean Code

Want to avoid becoming a code monkey? Try Good Practice

Software expert Robert C. Martin presents a revolutionary paradigm with Clean Code: A Handbook of Agile Software Craftsmanship. Martin has teamed up with his colleagues from Object Mentor to distill their best agile practice of cleaning code "on the fly" into a book that will instill within you the values of a software craftsman and make you a better programmer.

$ Check price
49.9949.99Amazon 4.5 logo(427+ reviews)

More Good Practice resources

Take your Linux skills to the next level!

How Linux Works

Take your Linux skills to the next level! Try Linux & UNIX

In this completely revised second edition of the perennial best seller How Linux Works, author Brian Ward makes the concepts behind Linux internals accessible to anyone curious about the inner workings of the operating system. Inside, you'll find the kind of knowledge that normally comes from years of experience doing things the hard way.

$ Check price
39.9539.95Amazon 5 logo(114+ reviews)

More Linux & UNIX resources