Why convert PKG to ZIP?
Extracting a .pkg to ZIP is mainly useful for inspecting or transporting the installer contents on a Windows or Linux machine where Apple's Installer is unavailable. Repacking into ZIP does not preserve the installer logic or scripts, so the output is a read-only archive of the package internals.
How to convert PKG to ZIP
7-Zip FREE
Right-click the .pkg, choose 7-Zip > Open archive to browse the XAR contents, extract everything to a folder, then right-click that folder and choose 7-Zip > Add to archive with format set to ZIP.
Pacifist APP
Open the .pkg in Pacifist, use File > Extract to export the files to a staging folder, then right-click that folder in Finder and choose Compress to produce a ZIP.
About these formats
A PKG file is a macOS Installer package - it installs software on a Mac. Double-click it to run Apple's Installer app, which will walk you through setup (admin password usually required).…
Open .PKG details →A ZIP file is a compressed archive that stores one or more files in a single smaller package. On Windows, macOS, iOS, and Android you can open it without installing anything - just…
Open .ZIP details →Quality & what to watch
- A macOS
.pkgis XAR format (magic bytesxar!), not ZIP - 7-Zip handles it directly because XAR is an open archive format. - The
Payloadfile inside the extracted folder is itself a gzip-compressed cpio archive; a second extraction step is needed to reach the actual installed files. - Repacking into ZIP does not preserve installer logic - install scripts, the BOM, and the Distribution XML are present as files but no OS will execute them from a ZIP.
Frequently asked questions
Does the resulting ZIP work as an installer?
Can I extract a `.pkg` on Linux?
xar command-line tool to unpack the XAR archive, then cat Payload | gunzip | cpio -id to reach the installed files.What is inside a `.pkg` file?
.pkg contains a gzip-compressed cpio Payload, a Bill of Materials (BOM), a PackageInfo or Distribution XML manifest, and optional pre/post-install shell scripts.What about older `.pkg` files from before Mac OS X 10.5?
.pkg, not single-file XAR archives - you can ZIP them directly with any archiver.