📢 Newsroom Update

The iPhone 16 and iPhone 16 Pro lineups, Apple Watch Series 10, the new black titanium Apple Watch Ultra 2, AirPods 4, and new colors for AirPods Max are now available! Learn more >

You can make a difference in the Apple Support Community!

When you sign up with your Apple ID, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

"“PKInstallSandbox-tmp” couldn’t be removed." - installation failures

Hey everyone,



Lately I've been having some problems installing packages and applications on my MacBook Air. It's running 10.7.2, and whenever I try to install anything (updates, applications) it fails; always providing me with generally the same error.


Below is the installation log from my trying to install the latest client combo update: http://support.apple.com/kb/DL1524


I downloaded the package now; but it also errors out when I try to install it via the Software Update prompt.


Below that is the error I get when trying to install VirtualBox. I see that the common element seems to be "“PKInstallSandbox-tmp” couldn’t be removed.".


Can anyone help? I have no idea what I am dealing with here.


Thanks in advance.



Update Combo error:


http://pastebin.com/xdQVkdwe


VirtualBox error:


http://pastebin.com/VUNXWc5p

MacBook Air, Mac OS X (10.5.2)

Posted on May 10, 2012 6:39 PM

Reply
5 replies

May 13, 2012 5:17 PM in response to TjallingOtter

Hey all,


Thanks to you all for chipping in (ahem), but either way, I managed to solve the situation. I'll just post the solution for the poster above me and anyone who may come across this post and has similar issues.


What I figured was that the problem basically boiled down to the installer not being able to delete /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/Cleanup At Startup/PKInstallSandbox-tmp/.


So first my logic led me to alter the permissions of those folders (in order to give the installer the permission to delete or empty the folder). This is done as follows:


Go to Finder > Go > Go to Folder... > /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000 > Right click 'Cleanup at Startup' > Get Info > Sharing & Permissions (bottom tab) > Click the padlock icon > Enter your credentials > Change the permissions for 'everyone' to 'Read & Write' > Click the gear icon > Apply to enclosed items...


Now, that didn't work (the installer still failed), but it is necessary for the next and final step. Since the installer wanted to empty the folder, why not do it for it?


So, you go into the 'Cleanup at Startup' folder and delete everything.


That's it. I have no idea if this is a good idea, compromised any security or something and it may not even work as a solution in your case, but it may and it's worth a try.


P.S.: When emptying out the folder an error came up saying one file was in use. That's okay, installations worked fine after that regardlessly.

Jan 20, 2013 10:17 AM in response to brad-apple

Linc (or others), in case these details help, here is a link to a gist showing the file that is buried deep under the directory called PKInstallSandbox-tmp (yes, it's actually a directory folder, *not* a file as I said in my prior post)


https://gist.github.com/4580335


(I am having the same symptom as TjallingOtter when attempting to do an HP printer update that came out recently that I'm applying to my OS X 10.7.5 system.)

Jan 20, 2013 5:22 PM in response to brad-apple

In case anyone else comes across this, I fixed it by following TjallingOtter's procedure, that is:


1) Turning on hidden files so I could see them. Do this by executing the following from a terminal window. You can open a terminal by choosing Command-Space (for Spotlight), then typing in terminal, then pressing return.

2) In the window that opens, type the following (don't type the '$ ', just the text after it):

$ defaults write com.apple.finder AppleShowAllFiles -bool true

$ killall Finder

3) Go to Finder and open a window, then choose your Device (laptop, iMac, etc.) from the Devices on the left, then choose your Hard Drive, then navigate down to find the PKInstallSandbox-tmp file that you are looking for.

4) At the level of /Cleanup at Startup you may see a '-' in a red circle, which means you need to change the permissions, as TjallingOtter describes above. Change those to Read & Write by Everyone.

5) Select the PKInstallSandbox-tmp directory in /Cleanup at Startup, then choose "Move to trash"

6) Try installing your software again. Mine worked at this point.

7) Be sure to turn off hidden files, they normally shouldn't be messed with! Do that by going back to your Terminal window (or starting one up again if you've already closed it, by using Command-Space and typing 'terminal' into Spotlight and pressing return.

8) In the window type the following (only difference from before is now you're using false at end instead of true--again, don't type the '$ '):

$ defaults write com.apple.finder AppleShowAllFiles -bool false

$ killall Finder


Voila. All fixed. Your mileage may vary!

"“PKInstallSandbox-tmp” couldn’t be removed." - installation failures

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.