Mac Trash Says Items In Use By Library

03.04.2020by
Mac Trash Says Items In Use By Library Rating: 4,5/5 5295 reviews

Cannot empty trash because item is in use 19 comments Create New Account
  1. 2019-12-15  01) How to Force Empty Trash on Your Mac Using Terminal. The Terminal application in Mac OS X can be scary. It allows you to modify your computer in ways you can’t reverse. If you’re not comfortable in a command line environment, then you should skip.
  2. How to delete a file that macOS says is in use. When you empty the trash, your Mac will show a warning dialog that reads, “The operation can’t be completed because the item ‘name’ is in.
  3. 2020-3-27  Deleted photos from MacBook but storage space not reclaimed. Ask Question. Did you empty Trash (Recycle Bin for Mac) (After moving your files to the external HDD? Hold option and command and use the go menu in finder to choose Library.
Click here to return to the 'Cannot empty trash because item is in use' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.

Cannot empty trash because item is in use Authored by: teacy123 on Jan 23, '11 05:12:12AM I found that the main reason in my use was the calculation of thumbnails (e.g. Flip4Mac calculating a thumbnail for a large WMV file in the trash). Deleting files and emptying the trash on a Mac can be easy, unless you run into one of these problems: Emptying trash when item is in use, deleting a locked file, deleting files from a hard drive. 2014-11-17  Cannot empty trash because item is in use Authored by: teacy123 on Jan 23, '11 05:12:12AM I found that the main reason in my use was the calculation of thumbnails (e.g. Flip4Mac calculating a thumbnail for a large WMV file in the trash). 2020-4-5  Using the Terminal to locate the “in-use” app and the corresponding file Use Terminal to locate the app that is using the file. If you’re comfortable using the macOS Terminal, there is a command you can try that will identify which app is using the specific file. Double-click on the Trash and make sure that a Finder window pops up.

My foolproof method has always been with rm. Open your Terminal and type: As always, be careful with rm.

My problem is that frequently the file said to be in use is NOT in use, and the related app is closed. Secure empty trash works in this case. Why does the sys think such files are still in use?

Of course, first make sure that the file is not actually in use by an application.
Perhaps force quitting the Locum process is more elegant, but my solution has always been to open a terminal window and delete the file directly (i.e. type 'rm ' in the terminal window and drag the file in question to the terminal window, then hit return. However, this may leave the Locum process hanging.. I haven't checked.

For me, this problem occurs with any file I mail as an attachment with Mail.app. It's been this way since 10.6.0 and I've filed a bug with Apple (as have many according to the Apple discussion forums) but it's still an issues. Overall, just kind of annoying but I wish they'd fix it!
One more thing: if you have a LOT of items in your trash that take up a lot of disk space, it's best to use a regular 'empty trash' first and tell it to continue when you get the error about not being able to remove certain items. Then follow up with the secure-empty trash. Otherwise it can take a long time to securely erase all those files.

My solution to Mail attachments that cannot be deleted from the Trash is simply to quit and relaunch the Mail app. Takes 2-3 seconds and works every time.

Will doing this invoke the secure delete bug where the temporary file is left in place and forgotten? (thus taking up disk space forever/manually deleted)

if you know the file that can't be trashed is harmless, just

cd ~/.Trash; rm -rf *

handle with care, though.

Bad. Bad shell scriptor!
What if I made a typo in the directory name? The way you wrote the command, you run a VERY real risk of deleting everything in your home directory. Which, presumably isn't something you want to have to recover from.
Much, MUCH better would be:
$ cd ~/.Trash && rm -rf *
I know you said 'handle with care', but such a simple modification makes it MUCH safer.
Remember friends, when one command depends on the successful completion of another command && is what you want. Not ;.
What's the point of CDing in the first place? Why not:
rm -rf ~/.Trash
There's no point to changing to that directory if you only wish to perform a single action in that directory.
Even better:
rm -rf ~/.Trash; rm -rf /Volumes/*/.Trashes
A while ago I wrote a little script to tell me which process was holding onto a file and preventing me from emptying the Trash. It's not much, just 2 lines of bash, but it's been helpful.

That is quite useful, thanks.
Something interesting about that: After mailing an attachment, then trashing the document I had attached, I got the expected file in use error. So I tried the lsof grep -i busy command you pointed out and came up with nothing. Very peculiar this mail attachment bug..

If Shift + Option + Command + Delete won't empty everything I Option click the Finder App in the Dock and choose Relaunch.

Slightly off topic, but I feel compelled to point out what I think is bad advice in general. I've been using unix since the late 70's. I'm reasonably savvy with unix, yet I almost never use rm * to delete files. The only time I ever do this is after I double and triple check that I'm in the right directory and I list the files that I'm about to nuke as an alternate check that the destruction I am about to wreak is the destruction I intend. I would never recommend the use of this command to anyone because I can never be sure that they are as careful as I am.

In the case of this example, it's like using a chainsaw to remove a wart. It's simply not necessary. All you have to do is open a terminal window and type rm followed by a space, open your trash and drag the file you want to remove to the terminal window, then hit return. It's easy. It's safe. It's effective. It's actually quicker than doing the cd to your Trash folder in the terminal.

Nov 09, 2018  Find the Photos Library on your Mac, it will be in your Pictures folder. Click the Go menu on the top and then select Home option from the menu. Open the Pictures folder and there you will find the Photos library. TIP: In order to see how much storage your photos have taken. Jul 03, 2018  For most of us, the Photos Library is located in the Pictures folder on the Mac’s hard drive. You can make a copy of that by clicking and dragging it onto another disk. Use an external hard disk, Network Attached Storage (NAS) device (like one from Synology, QNAP, or Morro Data) or other means to copy the library. Dec 11, 2018  You can always switch back to the regular library when you need to. Double click the backup library to open it, then open the preferences for Photos from Photos Preferences in the menubar. Select “Use as System Photos Library,” which will change the default to the new library. Back Up Your Drive Automatically With Time Machine. Backing up files manually is not the best solution, as. Back up mac photo library.

Sorry, climbing down from my soapbox now.

I agree, the rm command should almost never get * in normal usage, it's just too risky, even when we

Mac Trash Says Items In Use By Library In America

think we know what we're doing. Trash

How to backup your photo library mac download. I always add the -i flag ('interactive') when issuing rm -rfi so the system asks before deleting every file.

---
Madness takes its toll.
Please have exact change.
Another option would be to use the lsof command and try to close whatever is using the file. Something like lsof grep Trash.

I found that the main reason in my use was the calculation of thumbnails (e.g. Flip4Mac calculating a thumbnail for a large WMV file in the trash).
Not looking at the trash but using the 'Empty Trash' context menu on the Dock prevents most occurrences for me.

hello,
very annoying this, BUT i found a good working solution here:
http://thexlab.com/faqs/trash.html
Force the Trash to empty using the Option key
This technique uses a hidden feature of Mac OS X to force the Trash to empty. Perform the following steps in the order specified:
Press and hold the mouse button on the Trash icon in the Dock. The context menu for Trash will display.
Press and hold the Option key or the Shift-Option keyboard combination,
Select Empty Trash from the context menu for Trash.
Release the keys pressed and held in step 2.
it actually works (mac osx lion)
good luck

Sorry to bump this old thread, but I was trying to take the advice posted here, and entered cd
~/.Trash
rm -r *
as two separate lines..now everything in my documents, downloads, desktop, and some other things are gone. Is there any way to undo this!? I'm freaking out, I have some important stuff that is not backed up (stupid, I know).

Mac Trash Says Items In Use By Library In Texas

There is another minor caveat with the rm-based alternative. If you rm a file while it is in actual use, you will most likely not get the disk space back until that file is released by whatever is holding an open file descriptor to it. The file will disappear from the Trash and directory listings, so if you just like to see an empty Trash icon, then ok. If you actually want the disk space marked as free for other uses, this is usually not enough.
For large files, more comprehensive (though time consuming) solution is to use lsof grep <filename> to check what process is holding the file open, and then killing that process. This way you can use empty trash from the GUI and guarantee yourself the disk space back.

Comments are closed.