Convert DEB to RPM or RPM to DEB Package

You can convert DEB file to RPM package and RPM to DEB package using alien command, if you have a *.rpm file that you want to install on a Debian or Ubuntu.

Convert RPM to DEB

Install alien command on Ubuntu as mentioned here:
# sudo apt-get install alien

Now, use alien command to convert rpm to deb file,
# alien clamav-0.92.1-1.el5.rf.i386.rpm
clamav-0.92.1-1.el5.rf.i386.deb generated

Finally, Install deb packages using the dpkg command,
# dpkg -i clamav-0.92.1-1.el5.rf.i386.deb

-i = install a package

Convert DEB to RPM

Use alient -r option to convert a deb file to rpm file.
# alien -r clamav-0.92.1-1.el5.rf.i386.deb
clamav-0.92.1-1.el5.rf.i386.rpm generated

Once you generate the rpm file, you can install it on Red Hat, Fedora or CentOS.
Finally install rpm,
# rpm -ivh clamav-0.92.1-1.el5.rf.i386.rpm

-i = Install RPM
-v = Install in verbose Mode
-h = Print  50  hash  marks  as the package archive is unpacked


  1. Hi!

    I am trying to convert an .deb to .rpm but i am getting below error using alien

    alien -r shbecrdeb_1.0.2_i386.deb
    Use of uninitialized value in lc at /usr/local/share/perl5/Alien/Package/ line 556.
    Use of uninitialized value in lc at /usr/local/share/perl5/Alien/Package/ line 556.
    Warning: Skipping conversion of scripts in package : postinst
    Warning: Use the --scripts parameter to include the scripts.
    Use of uninitialized value in lc at /usr/local/share/perl5/Alien/Package/ line 556.
    Use of uninitialized value $_ in pattern match (m//) at /usr/local/share/perl5/Alien/Package/ line 599.
    Use of uninitialized value $_ in concatenation (.) or string at /usr/local/share/perl5/Alien/Package/ line 600.
    mkdir: invalid option -- '0'
    Try 'mkdir --help' for more information.
    unable to mkdir -0: at /usr/local/share/perl5/Alien/ line 257.

  2. LInux MInt i386

    sudo apt-get install alien ------> Installed

    alien clamav-0.98-2.el5.rf.i386.rpm
    warning: clamav-0.98-2.el5.rf.i386.rpm: Header V3 DSA/SHA1 Signature, key ID 6b8d79e6: NOKEY

    Please Help!

  3. You would usually need `rpmrebuild -pe my-pkg.rpm` and remove directories like "/", "usr/sbin", etc. that are not really owned by the resulting RPM. Otherwise you get errors on install like:
    file / from install of redsocks-0.4+dfsg-3.x86_64 conflicts with file from package filesystem-3.2-20.el7.x86_64

  4. This is the fitting weblog for anyone who needs to find out about this topic. You understand a lot its almost laborious to argue with you (not that I really would want…HaHa). You definitely put a brand new spin on a topic thats been written about for years. Nice stuff, simply nice! play casino