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.

Requirements

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

Syntax

The syntax for alien is as follows:

$ alien [options] file[...]

Options

Here are some of the commonly used options with alien.

-d|--to-deb
Convert the specified package to Debian. This option is the default.
-r|--to-rpm
Convert to RPM.
--to-slp
Convert for Stampede Linux.
--
-t|--to-tgz
Convert to a Slackware tgz package.
-i|--install
Installs the converted package, then removes it.
-k|--keep-version
Keep the version number of the generated package.
-v|--verbose
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?

The Pragramatic Programmer

Want to avoid becoming a code monkey? Try Good Practice

The Pragmatic Programmer illustrates the best practices and major pitfalls of many different aspects of software development.Whether you're a new coder, an experienced programmer, or a manager responsible for software projects, use these lessons daily, and you'll quickly see improvements in personal productivity, accuracy, and job satisfaction.

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

More Good Practice resources

Take your Linux skills to the next level!

The Linux Command Line

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

The Linux Command Line takes you from your very first terminal keystrokes to writing full programs in Bash, the most popular Linux shell. Along the way you'll learn the timeless skills handed down by generations of gray-bearded, mouse-shunning gurus: file navigation, environment configuration, command chaining, pattern matching with regular expressions, and more.

$ Check price
39.9539.95Amazon 4.5 logo(274+ reviews)

More Linux & UNIX resources

Ad