Want to highlight a helpful answer? Upvote!

Did someone help you, or did an answer or User Tip resolve your issue? Upvote by selecting the upvote arrow. Your feedback helps others! Learn more about when to upvote >

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

The operation can’t be completed because the item “ " is in use.

I'm Trying to delete Files on my USB drive that is connected to the Apple base station..


But get a error message saying: "The operation can’t be completed because the item "xxx.jpg" is in use."


I tried all the files the same thing. I plugged the drive directly into the mac to do a disk utility app the only thing I can select is Verify disk and it was okay.. But could not select repair permission option??

Posted on May 29, 2012 10:25 AM

Reply
Question marked as Best reply

Posted on May 29, 2012 10:41 AM

The easist way to solve this is Shutdown the computer, with the drive still connected.


After shutdown, remove the drive from the mac, then startup.


After startup has finished, connect the drive to the computer (not the base station) and delete the files.

14 replies

May 29, 2012 11:05 AM in response to William @ Quebec

When programs open a file they put a filesystem lock on it to prevent other programs from editing the file at the same time. This is usually a quick lock so the file can be read into memory, and then the lock is released; however, there are times when a program needs to maintain a lock, or times when a bug might prevent the lock from being released. When this happens if you try to edit or delete the file the system will not allow it and will issue you the "in use" error. Fixing this requires quitting and relaunching of the application, but if you cannot figure out which application it is (or if it is a background service in OS X), then as softwater mentioned the easiest solution is to reboot the system. This will cause all processes in OS X to release their filesystem locks and re-initialize, and therefore clear the problem.

May 29, 2012 11:10 AM in response to William @ Quebec

It wouldn't work before because some process was still running that was holding those file addresses in memory.


The easiest way to solve that is to keep the files connected and kill every process to release them from memory (which is what you did by doing 'Shutdown').


Of course, you can do it without shutting down if you know precisely which process(es) are causing the problem. Sometimes, that's as simple as quitting the last app that you used to read then, but other times, there are hidden processes going on that continue even when you quit the App's user interface.


Hence, a complete shutdown is often easier and always effective!

May 29, 2012 11:41 AM in response to softwater

The "Resume" feature is separate from file locks. Resume just stores a document/window configuration for each program and will read this to restore the workflow as-is (using auto-saved files, etc.) when the program is next launched. The file lock issue happens below this, where any time an active program accesses a file (be it in an auto-resume configuration, a user-opened document, or otherwise) it will place a lock on it while the read/write process is happening, and then should release this lock if programmed properly.


Shutting down or restart/rebooting will do the same thing with regards to the file locks. Both processes will require all programs to quit and thereby release any current file locks they may have.

Jun 1, 2013 5:56 AM in response to amitchauhan274

The only time to use the -r flag in that command is if you are deleting a folder with items in it. Otherwise leave this flag out as it will recurse through folders and remove all items within the targeted location. If for some reason you make a mistake in your syntax in targeting a single file, then you can inadvertently remove a large number of files if you include the -r flag.

The operation can’t be completed because the item “ " is in use.

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