RPMUNCOMPRESS(1) General Commands Manual RPMUNCOMPRESS(1)

# [NAME](#NAME)

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

# [SYNOPSIS](#SYNOPSIS)

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

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

# [DESCRIPTION](#DESCRIPTION)

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

It's normally invoked internally by [**rpmbuild**(1)](/man/os/rpm/rpmbuild.1) to handle **%setup** and **%patch** related tasks in spec files, but can be useful manually invoked as well.

# [ARGUMENTS](#ARGUMENTS)

*FILE*

A regular file, optionally compressed.

*ARCHIVE*

A [**tar**(1)](/man/os/rpm/tar.1), [**zip**(1)](/man/os/rpm/zip.1), CAR or Ruby GEM file. **tar** archives may be compressed.

# [OPERATIONS](#OPERATIONS)

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

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

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

# [OPTIONS](#OPTIONS)

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

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

See [**rpm-common**(8)](/man/os/rpm/rpm-common.8) for options common to all rpm executables.

# [EXTRACT OPTIONS](#EXTRACT_OPTIONS)

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

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

# [EXIT STATUS](#EXIT_STATUS)

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

# [EXAMPLES](#EXAMPLES)

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

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

**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](#SEE_ALSO)

[**rpm-common**(8)](/man/os/rpm/rpm-common.8), [**rpmbuild**(1)](/man/os/rpm/rpmbuild.1), [**popt**(3)](/man/os/rpm/popt.3)

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

2026-08-31 RPM 6.1.0

---

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