RPM2ARCHIVE(1) General Commands Manual RPM2ARCHIVE(1)

# [NAME](#NAME)

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

# [SYNOPSIS](#SYNOPSIS)

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

# [DESCRIPTION](#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)](/man/os/rpm/gzip.1) 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](#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](#OPTIONS)

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

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

**-f**, **--format**=&lt;*FORMAT*&gt;

Generate archive in specified *FORMAT*:

- **pax**: Restricted Portable Archive Exchange as used by [**tar**(1)](/man/os/rpm/tar.1) (default)
- **cpio**: The "new" ASCII [**cpio**(5)](/man/os/rpm/cpio.5) format. Note that this format has a 4GB limit on the individual file size.

# [EXIT STATUS](#EXIT_STATUS)

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

# [EXAMPLES](#EXAMPLES)

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

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

**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)](/man/os/rpm/cpio.5), compatible with [**rpm2cpio**(1)](/man/os/rpm/rpm2cpio.1) 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)](/man/os/rpm/tar.1).

**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)](/man/os/rpm/tar.1).

# [SEE ALSO](#SEE_ALSO)

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

2026-10-04 RPM 6.1.0

---

Document: rpm2archive(1) from rpm 6.1.0-r2 (Chainguard OS)
Source: https://github.com/rpm-software-management/rpm
