VMware ESXi and vSphere Cluster Management
Convert Linux Packages Between DEB, RPM, TGZ, SLP, and PKG Formats with Alien
Learn how to use Alien to convert DEB, RPM, TGZ, SLP, and PKG packages, inspect the result, resolve dependencies, and install safely.
Alien is a command-line utility that converts software package files between several Linux and Unix package archive formats. It can convert Debian DEB, Red Hat-family RPM, Stampede SLP, compressed tarball TGZ, and Solaris PKG formats where the installed Alien version supports those targets.
A common use case is receiving an application as an RPM when the target machine uses a Debian-derived distribution, or receiving a DEB when the target machine uses an RPM-based distribution. Conversion can be useful when no native package is available, but it is a compatibility workaround—not a guarantee that the software will run correctly.
Package formats and package-management context
A package file is an archive containing software files and metadata. It is not the same thing as a repository. A repository can provide packages, dependency information, updates, signatures, and version selection; a converted file normally contains only the information and files derived from the original package.
| Format | Typical ecosystem | Example installation command | Important caveat |
|---|---|---|---|
| DEB | Debian-derived distributions | sudo dpkg -i package.deb | Low-level installation may leave dependencies unresolved. |
| RPM | Red Hat-derived and other RPM-based distributions | sudo rpm -i package.rpm | Use the target distribution's dependency tooling when possible. |
| TGZ | Compressed tar archive deployment | tar -xzf package.tgz | It is an archive, not a normal native package-manager installation. |
| SLP | Stampede Linux | Use the applicable Stampede package tool. | Legacy and less common; support depends on the Alien version. |
| PKG | Solaris package ecosystem | Use the applicable Solaris package tool. | Target-platform compatibility must be checked separately. |
DEB is the package format used by Debian and distributions derived from it. RPM is used by Red Hat-derived and other RPM-based distributions. TGZ is a gzip-compressed tar archive; extracting it does not automatically register files with a package database. SLP and Solaris PKG are less common output formats that may be available in relevant Alien versions.
Prerequisites
- Install Alien from the target distribution's native repository when available.
- For DEB and RPM conversions, install and verify the relevant Debian and RPM package tools.
- Install cpio, an archive utility required by applicable extraction and conversion workflows.
- Work in a writable directory and keep the original package unchanged.
- Use root privileges, meaning administrative permissions, for system-wide installation. Conversion and inspection can usually be performed as an ordinary user.
For example, use the target distribution's package manager to install Alien and cpio. The exact package names and repository availability vary by distribution and release. If the command is unavailable after installation, check its location and the current PATH.
command -v alien
command -v cpio
alien --version
Alien syntax and default behavior
The general command structure is:
alien [options] package-file
The input filename determines the source format. For example, a filename ending in .rpm is treated as an RPM input, while a filename ending in .deb is treated as a DEB input. When no output-format option is supplied, Alien produces a DEB package by default.
alien vendor-package.rpm
The command above normally creates a DEB artifact in the current directory. Explicitly selecting an output type is clearer in documentation, scripts, and administration procedures because it states the intended target format.
| Option | Long option | Generated format | Typical use |
|---|---|---|---|
-d | --to-deb | Debian DEB | Prepare a package for a Debian-family system. |
-r | --to-rpm | RPM | Prepare a package for an RPM-based system. |
-t | --to-tgz | gzip-compressed tarball | Produce an archive for manual review or deployment. |
| None | --to-slp | Stampede SLP | Produce an SLP package where supported. |
-p | --to-pkg | Solaris PKG | Produce a Solaris package where supported. |
Validate the package before conversion
Conversion should begin with validation, not with installation. Confirm where the source package came from and verify its checksum or signature when the publisher provides one. Also check its version, architecture, operating-system assumptions, and dependencies.
| Check | Why it matters | How to verify |
|---|---|---|
| CPU architecture | A package compiled for x86_64 may not run on ARM64, and a 64-bit package cannot normally be installed on a 32-bit system. | Use the package metadata tools or the distribution's package query command. |
| Operating-system release | Libraries, service managers, filesystem paths, and system utilities can differ between releases. | Read the vendor requirements and compare them with the target release. |
| Package source and integrity | An untrusted or modified package can compromise the system. | Check the trusted source, signature, and published checksum. |
| Dependencies | Conversion does not bundle every required library or application. | Inspect metadata and compare requirements with native repositories. |
| Conflicting installed packages | Files or package names may collide with software already installed. | Query the target package database before installation. |
| Service and installation-script assumptions | Scripts may assume particular users, groups, paths, service managers, or utilities. | Inspect package contents and scripts in a test system first. |
Example: convert an Nmap RPM to DEB
Assume a trusted Nmap RPM is named nmap-version.arch.rpm. Replace the example name with the exact file you received. First confirm that the RPM matches the target CPU architecture and intended distribution release.
mkdir -p ~/package-conversion
cd ~/package-conversion
cp /path/to/nmap-version.arch.rpm .
alien --to-deb nmap-version.arch.rpm
The short form is equivalent for this conversion:
alien -d nmap-version.arch.rpm
Alien writes the generated file in the current directory. Its name is normally derived from the source package's name and version, but the exact spelling can vary. List DEB files rather than guessing the filename.
ls -l -- *.deb
Inspect the generated package before installing it:
dpkg-deb --info generated-package.deb
Review the package name, version, architecture, dependencies, and description. If the metadata and compatibility checks are acceptable, install it with the low-level Debian tool:
sudo dpkg -i generated-package.deb
dpkg installs the local file but does not always obtain missing dependencies. If it reports missing dependencies, read the errors and use the Debian-family distribution's dependency-resolution tool, such as its normal package manager, to locate compatible packages. Do not solve dependency errors by blindly forcing installation.
Example: convert a DEB to RPM
Assume the input is application_version_arch.deb and the target system uses RPM packages. Confirm that the DEB's architecture, required libraries, and release assumptions match the target first.
cd ~/package-conversion
alien --to-rpm application_version_arch.deb
The short form is:
alien -r application_version_arch.deb
Locate the generated RPM in the current directory:
ls -l -- *.rpm
Inspect its metadata before installation:
rpm -qip generated-package.rpm
After reviewing the name, version, architecture, dependencies, and files, install it with RPM tooling:
sudo rpm -i generated-package.rpm
If dependencies are missing, use the target RPM distribution's native dependency-resolution manager to find compatible packages. Native tools are better suited to repository selection, dependency ordering, updates, and conflict handling than a direct low-level RPM installation.
Use other output formats
Alien can also produce a TGZ archive. This is useful when you want to review or manually deploy the extracted files rather than register a native package.
alien --to-tgz package-file
tar -tzf generated-package.tgz
Because a TGZ is not tracked like a DEB or RPM, manual extraction may leave no reliable package record for upgrades or removal. Plan file ownership and rollback before deploying its contents.
alien --to-slp package-file
alien --to-pkg package-file
--to-slp targets Stampede SLP, while --to-pkg targets Solaris PKG. These formats are less common, and support depends on the installed Alien version and the surrounding operating-system tools.
Limitations and risk management
Alien changes the package archive and translates package metadata. It does not automatically make the software compatible with the target distribution. A converted binary can still require shared-library versions that do not exist, use different filesystem paths, depend on differently named packages, or expect another service manager.
- Architecture mismatch: A package built for a different CPU architecture may be impossible to execute even if conversion succeeds.
- Version conflicts: The target may provide an older or newer library than the application expects.
- Dependency naming differences: A dependency name in one ecosystem may not map cleanly to a package name in another.
- Maintainer scripts: Installation and removal scripts may assume specific users, groups, paths, init systems, service managers, or system utilities.
- System integration: File ownership, service startup, logging, security policies, and update behavior may not match the target distribution.
- Core-package risk: Avoid blindly converting kernels, libc, package-manager components, init systems, or other core system and security-sensitive packages.
Test a conversion in a virtual machine, container where appropriate, or non-production host. A container may not reproduce all kernel, service, or hardware conditions, so use a virtual machine or dedicated test machine when system integration is important.
Inspect, install, and roll back safely
- Retain the original package and record its checksum, source, version, and architecture.
- Convert it in a writable working directory without unnecessary administrative privileges.
- Inspect the generated package metadata and, when practical, its file list and installation scripts.
- Confirm that required runtime libraries, services, users, groups, and system utilities exist on the target.
- Install using the target package format's tooling and resolve dependencies with the target distribution's native manager.
- Test the application, service startup, logs, permissions, upgrades, and removal.
To roll back a DEB installation, remove the installed package by its package name with the Debian package tool:
sudo dpkg -r package-name
For an RPM installation, remove the package by its RPM package name:
sudo rpm -e package-name
Use the target distribution's higher-level package manager when it provides a safer removal operation or must also clean up dependencies. Removing a package does not necessarily undo data created by an application or changes made by installation scripts, so review those changes separately.
Troubleshooting
Alien command is not found
Alien may not be installed, or its executable may not be in the current user's PATH. Install it from the target distribution's repository when available, then verify:
command -v alien
alien --version
A helper such as RPM, dpkg, or cpio is missing
Conversion requires the tools associated with the source and target formats. Some extraction workflows also require cpio. Install the missing utilities with the target distribution's package manager and retry. Check each command with command -v before diagnosing Alien itself.
Dependencies are missing
Dependency names and versions differ between distributions, and the source package may expect libraries unavailable on the target. Read the dependency errors, search native repositories for compatible packages, and avoid forcing installation. If the requirements cannot be met safely, use a native build, vendor package, container, or compatible application release.
The package installs but the application does not start
Check application logs, shared-library requirements, executable permissions, configuration paths, service definitions, users, and groups. Installation scripts may have completed while the runtime environment remains incompatible. Remove the converted package and use a supported installation method if the mismatch cannot be corrected reliably.
The architecture or platform does not match
Conversion does not translate machine code. Obtain a package compiled for the target architecture, such as x86_64 or ARM64, and confirm that its operating-system release requirements are appropriate.
Installation requires elevated permissions
Installing system software modifies protected directories and package databases, so administrative permissions are normally required. Use sudo or another approved administrative method only for the installation or removal step; perform conversion, listing, and metadata inspection as an unprivileged user when possible.
Exam-relevant notes
- Alien converts package archives; it does not guarantee application compatibility.
- The input file determines the source package format.
- Without an output option, Alien produces DEB output by default.
-dand--to-debselect DEB output;-rand--to-rpmselect RPM output.-tselects TGZ,--to-slpselects Stampede SLP, and-por--to-pkgselects Solaris PKG.- DEB and RPM dependencies are not necessarily bundled in a converted package.
- Inspect metadata before installation and use the target distribution's dependency resolver where possible.
- Architecture, library versions, service managers, paths, and maintainer scripts are common causes of post-conversion failure.
For related guidance, continue with package conversion and installation workflows.