CPIO.cpio

How to Extract Files from a CPIO Archive on macOS

CPIO (Copy In/Copy Out) is a Unix archive format used internally by macOS installer packages (PKG files), Linux RPM packages, and initramfs images. While not commonly encountered directly, knowing how to handle CPIO files can be useful for developers and system administrators.

The default way to open CPIO files on macOS

Tool: Terminal (built-in)

$ cpio -id < archive.cpio

Steps

  1. Open Terminal.
  2. Navigate to the desired output directory.
  3. Run: cpio -id < archive.cpio
  4. To list contents: cpio -it < archive.cpio
Note: The cpio command is available on macOS. It reads from stdin, so use < redirection.

Extract individual files from a CPIO archive

The default macOS tools extract everything — there's no way to pick individual files. MacPacker lets you browse CPIO archive contents, preview files, and extract only what you need — without unpacking the entire archive.

A better way: open CPIO files with MacPacker

MacPacker is a free, open-source macOS archive manager that supports CPIO and 30+ other formats. Unlike the default tools, MacPacker lets you:

  • Browse archive contents like a folder
  • Preview files with Quick Look without extracting
  • Extract individual files via drag and drop
  • Navigate nested archives (archives within archives)
  • Enjoy a native SwiftUI interface that feels right at home on macOS

Get MacPacker

v0.15.1 · macOS 14+
$ brew install --cask macpacker

App Store updates may lag a few days behind direct downloads due to Apple review.

Frequently asked questions

How do I extract a CPIO file on Mac?

Open Terminal and run: cpio -id < archive.cpio. To list contents first: cpio -it < archive.cpio. MacPacker also supports CPIO files with visual browsing.

Related formats