---
name: "rpm2archive"
section: "1"
platform: "linux"
package: "rpm-tools"
version: "6.0.1-2"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/rpm2archive"
---

# rpm2archive(1)

Create tar or cpio archive from RPM Package Manager (RPM) package

## NAME

rpm2archive - Create tar or cpio archive from RPM Package Manager (RPM) package

## SYNOPSIS

**rpm2archive** \[options\] \[*PACKAGE\_FILE*\] ...

## DESCRIPTION

**rpm2archive** converts RPM package files to other archive formats.

If the standard output is a regular file or a pipe, the archive is written to the standard output. If the standard output is a terminal, the output is written to a file by the same name, appended with a *.tgz* or *.cpio.gz* suffix when compressed or *.tar* or *.cpio* otherwise depending on the format. The output is compressed in the [**gzip**(1)](/gzip/1.md) format by default.

**rpm2archive** does not verify package-level signatures or checksums, but it does verify the per-file checksums.

Supports RPM package formats 3, 4 and 6.

## ARGUMENTS

*PACKAGE\_FILE*

A binary or source RPM package.

If no arguments are present, or a dash (**-**) is given as an argument, data is read from the standard input.

## OPTIONS

- **-n**, **--nocompression**

  Generate an uncompressed archive. If in the file creation mode, use *.tar* as postfix of the filename.

- **-f**, **--format**=\<*FORMAT*\>

  Generate archive in specified *FORMAT*:

  - •

    **pax**: Restricted Portable Archive Exchange as used by [**tar**(1)](/tar/1.md) (default)

  - •

    **cpio**: The "new" ASCII [**cpio**(5)](/cpio/5.md) format. Note that this format has a 4GB limit on the individual file size.

## EXIT STATUS

On success, 0 is returned, a nonzero failure code otherwise.

## EXAMPLES

**rpm2archive glint-1.0-1.i386.rpm \| tar -xvz**

Extract *glint-1.0-1.i386.rpm* package contents with [**tar**(1)](/tar/1.md).

**rpm2archive --nocompression --format=cpio glint-1.0-1.i386.rpm \| cpio -idv**

Extract *glint-1.0-1.i386.rpm* package contents as an uncompressed [**cpio**(5)](/cpio/5.md), compatible with [**rpm2cpio**(1)](/rpm2cpio/1.md) output.

**rpm2archive glint-1.0-1.i386.rpm ; tar -xvz glint-1.0-1.i386.rpm.tgz**

Extract *glint-1.0-1.i386.rpm* package contents into an archive named *glint-1.0-1.i386.rpm.tgz* and extract the written archive with [**tar**(1)](/tar/1.md).

**cat glint-1.0-1.i386.rpm \| rpm2archive - \| tar -tvz**

Feed *glint-1.0-1.i386.rpm* package into **rpm2archive** via standard input, and list contents with [**tar**(1)](/tar/1.md).

## SEE ALSO

[**rpm2cpio**(1)](/rpm2cpio/1.md), [**rpm**(8)](/rpm/8.md)
