rpm2archive - Man Page

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) 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 file name.

-f,  --format=<FORMAT>

Generate archive in specified FORMAT:

  • pax: Restricted Portable Archive Exchange as used by tar(1) (default)
  • cpio: The "new" ASCII cpio(5) format. Note that this format has a 4GB limit on the individual file size.

Exit Status

On success, 0 is returned, a non-zero 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).

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), compatible with 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).

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).

See Also

rpm2cpio(1), rpm(8)

Referenced By

rpm2cpio(1).

2025-09-22 RPM 6.0.0