Delete file in PKInstallSandboxManager folder

I scanned my Mac SSD with DaisyDisk. And in this folder -/Library/InstallerSandboxes/.PKInstallSandboxManager I found this file - 13C0DF80-42F3-4228-B301-C0913855E2FA.activeSandbox with 8GB size. I open this file and see 2 folders - root and boms. In root -> Applications I found Xcode.app . After searching on web, I found out that the PKInstallSandboxManage folder is responsible for updating applications. It turns out that in my “updates” folder there is an Xcode package that takes up 8GB and is not used? Can I remove it?


Solution 1:

The answer to this is both NO and YES, NO you should never clear those temporary cache items yourself, but YES you can have Mac OS clear out the temporary files itself.

You should not modify or delete any of these folders:

.Spotlight-V100: Spotlight metadata for each mounted volume. The mdworker processes use this metadata to update Spotlight search.

.fseventsd: A log file of FSEvents logged by the fseventsd launchdaemon process. It monitors file system events, such as file creation, modification, deletion, and more. Time Machine uses this data to process backup in the background.

.DocumentRevisions-V100: macOS versioning database used by apps to save and retrieve different versions of a document.

.PKInstallSandboxManager: Used for software updates and sandboxing.

.PKInstallSandboxManager-SystemSoftware: Used for system software updates.

.Trashes: Trash folder in each mounted volume.

If for some reason you reboot the Mac and the temporary files and temp folders are still bloated with who knows what, you can reboot into Safe Mode by rebooting the Mac and holding down the Shift key, this performs additional measurements to get rid of temporary files and caches, when the Mac has finished booting into Safe Mode, rebooting back, as usual, should get things in check as expected.

And if you came across these folders because you’re running out of storage, check out some tips to free up disk space on the Mac, or do a file size based search, you’ll likely find something appropriate for recovering some space for your situation.

Solution 2:

I ran
sudo rm -rf /Library/InstallerSandboxes/.PKInstallSandboxManager
on my machine (macOS 11.4) since it gotten completely out of control with 200+ GB, which was mostly xcode app data.

No problems so far.