---
name: "rpmuncompress"
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/rpmuncompress"
---

# rpmuncompress(1)

RPM utility for compressed files and archives

## NAME

**rpmuncompress** - RPM utility for compressed files and archives

## SYNOPSIS

**rpmuncompress** \[options\] *FILE*

**rpmuncompress** \[options\] \[extract-options\] {**-x**\|**--extract**} *ARCHIVE*

## DESCRIPTION

**rpmuncompress** is a utility for transparently outputting compressed and uncompressed files, and extracting archives.

It's normally invoked internally by [**rpmbuild**(1)](/rpmbuild/1.md) to handle **%setup** and **%patch** related tasks in spec files, but can be useful manually invoked as well. The installation directory of **rpmuncompress** can be determined with **rpm -E "%{\_rpmconfigdir}"**.

## ARGUMENTS

*FILE*

A regular file, optionally compressed.

*ARCHIVE*

A [**tar**(1)](/tar/1.md), [**zip**(1)](/zip/1.md) or Ruby GEM archive. **tar** archives may be compressed.

## OPERATIONS

By default, **rpmuncompress** outputs *FILE* to standard output similar to [**cat**(1)](/cat/1.md), but transparently decompressing many popular compression formats, similar to [**zcat**(1)](/zcat/1.md).

**-x**, **--extract**

Extract the *ARCHIVE* passed as argument into the current directory, transparently uncompressing [**tar**(1)](/tar/1.md) archives if needed.

## OPTIONS

- **-n**, **--dry-run**

  Output the shell command that would be executed without this option.

## EXTRACT OPTIONS

- **-C** *PATH*, **--path**=*PATH*

  Extract into to *PATH* regardless of the archive's internal layout.

- **-v**, **--verbose**

  Provide verbose extraction output.

## EXIT STATUS

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

## EXAMPLES

**rpmuncompress /tmp/3911.patch.gz \| patch -p1**

Uncompress and output */tmp/3911.patch.gz*, similar to [**zcat**(1)](/zcat/1.md), and pipe to [**patch**(1)](/patch/1.md).

**rpmuncompress -x myproject.zip**

Extract *myproject.zip* archive into the current directory.

**rpmuncompress -x -C myproject myproject-1.0.7rc1.tar.gz**

Uncompress and extract *myproject-1.0.7rc1.tar.gz* archive into *myproject* directory, regardless of it's internal structure.

## SEE ALSO

[**rpmbuild**(1)](/rpmbuild/1.md), [**popt**(3)](/popt/3.md)

**http://www.rpm.org/**
