To get started, we need to open Terminal. To decompress the PKG with Payload files, we can use a combination of 'pkgutil -expand-full' with expand-full will help us to decompress the Payload file and view the package contents. This can be useful for inspecting the contents of the file, or for extracting the contents to a directory. With Software Installer PKG file types, The 'pkgutil' command can be used to expand the contents of a Software Installer PKG file.
We can also use different commands depending on what type or kind pkg file it happens that we're dealing with! There are many ways to open PKG files on Mac, and one of the most common is using commands in Terminal.