HT1338: OS X: Updating OS X and Mac App Store appsLearn about OS X: Updating OS X and Mac App Store apps
Did the error claim that a file was "in use"? If so then try restarting your computer and then immediately empty the trash when you next log in.
Alternatively, try holding the Option key when emptying the trash, which will force the deletion of files that are locked.
Finally, if you cannot empty files from the trash or are having trouble adding files to the trash, or cannot open the Trash for any reason, then try clearing the trash completely by opening the Terminal utility (in the Applications > Utilities folder) and running the following command (copy and paste it):
sudo rm -rf ~/.Trash
Be sure there are absolutely no spaces between the tilde, slash, and period characters in this command before pressing enter to execute it. Supply your password when prompted (it will not show), and this should clear and reset the trash for your user account.
The command I mention, its syntax, along with how to use it, is perfectly fine and will not hurt your system if run as I described. This command will remove the trash folder for your account, which will simply be rebuilt from scratch the next time you use the Trash, and will not do anything harmful to your system.
<Edited By Host>
This subject has nothing to do with your question, and you're almost certainly not interested, but it needs to be explained for the safety of others who may find this thread while searching for the solution to a similar problem.
The shell command that was posted, if a tiny error is made, has the potential to irrevocably wipe out every bit of data you have, including all backups. No one even remotely competent to use the shell would ever enter such a command himself, much less advise someone with no experience to do so.
Furthermore, you should not enter any shell command, or do anything else at all that could change files, unless you're sure you have current backups, which you haven't mentioned.
Emptying the Trash in the shell is never necessary under any circumstances. You should correct the condition that prevents you from emptying it. Again, every technically competent person knows that.
Finally, you need to understand something about this website. It's not a tech support site. It's a discussion site. The comments that are made on it, except for a few that are made by Apple representatives (none of whom is present in this thread), are not tech support. and are not necessarily correct or helpful. Some are very much the opposite of correct or helpful.
This advice being given regarding the use of shell commands, and especially the description of the one I recommended here as incorrect, is simply wrong.
Shell scripts and commands are valid approaches to troubleshooting and fixing problems, especially with access to the trash folders in OS X. Advice against valid uses of such commands is the only technical incompetance being demonstrated here.
Problems with access to trash folders are a common occurrence, and the proper use of shell commands (specifically this one) as I described are perfectly valid and confirmed approaches to tackling these problems.
However, do keep in mind that recommendations one way or the other, even when wrought with scare tactics, are merely opinion on this forum. I recommend you try the perfectly valid command I originally suggested, to see if it helps your situation at all. Just to confirm its validity, I have just run it on my system exactly as I described it, and it does exactly what I and many others know it to do, which is remove the trash and allow the system to rebuild it.
More Like This
- Retrieving data ...
- This solved my question - 10 points
- This helped me - 5 points