Have you encountered the issue “The operation can’t be completed because the item is in use” when you delete a file? Sometimes if you attempt any action that would corrupt the software in use, it prevents emptying the Trash folder and permanently deleting certain files. But this just overrides the error and the issue still exists.
This guide explores proven solutions to these issues. We’ll analyze disk-related issues, why this error appears and how to fix it. You will also know how to check locked or active files in the background process.
Contents: Part 1. Why Does It Keep Saying Folder in Use?Part 2. How to Fix The Action Cannot be Completed Because The File Is Open in System?Conclusion
People Also Read:Top 4 Ways to Teach You How to Format MacBook Pro How to Clean up Other Storage on Mac?
Part 1. Why Does It Keep Saying Folder in Use?
Mostly, Trash won’t empty if you have files still under use. Another app or background process might be using files. A pop-up will appear as follows “The operation can’t be completed because the item is in use”. This means you’ll have to close these files before you can remove permanently.
Force Empty the Trash While Files in Use
Often, infected files hide their location and you may not know where it’s open. In these cases, it may not appear in the background processes. To clear up doubts, reboot your Mac and then try emptying the file again. If it was in the background processes, you should successfully delete the file now.
Still stuck? You may have a startup or login item using the file. To briefly prevent errant items from launching automatically, reboot in safe mode by latching on the Shift key while the machine starts up. Then offload the Trash and start up your Mac normally.
Part 2. How to Fix The Action Cannot be Completed Because The File Is Open in System?
1. Get Rid of the Files that Won't Delete in Trash
Emptying Trash maintains a neat and uncluttered Mac. PowerMyMac frees up disk space and optimizes performance. It’s a multi-tool to spring-clean your machine. It cleans up your Mac to keep it in good condition.
If you want to delete files that won't delete or force remove the item that is in use on your Mac, the "Shredder" feature of PowerMyMac can help you to securely delete useless or no-longer-used files and folders forever.
You can also use its Junk Cleaner function to empty your trash easily. Just scan all the junks on your Mac and you can quickly choose the System Trash to delete.
2. Try to Repair The Disk
We also have a quick guide for you if you want to fix "The Operation Can’t Be Completed Because Item Is in Use" issue:
- Start up from Mac Recovery Mode by latching on Command-R while your machine boots.
- Once the Mac Utilities window pops up, click Disk Utility and hit Continue.
- In Disk Utility, choose the disk that has the file that you wish to delete. Repair the disk with the First Aid feature in the Disk Utility.
- Close Disk Utility, then reboot your computer and unload the Trash.
3. Force the Trash via Terminal
Force-empty Trash if you want to delete a locked file by pressing the Option key. Latch on Option and click on the Empty button. By pressing Option, you will override any locks on data. It comes in handy when Mac forbids unlocking files.
Alternatively, invoke a Terminal Command to force-empty Trash. This bypasses ay locks on your items and deletes files which may be in use. It also circumvents any errors that are emptying.
To permanently delete files, follow the steps below:
- Hold Cmd + Space to launch Spotlight.
- Enter Terminal and hold Return to open it.
- Fill in
sudo rm -r filePath
. The "filePath
" should be replaced with the path of files you want to delete forever. - Go to Trash and yank the files you want to remove to the Terminal window.
- Hold down Return.
- Type your administrator password to authenticate the command. This doesn’t hide as you type it because it’s a security step.
- Hit Return to authorize and launch the command.
4. Use Terminal to Check and Delete Locked Files
To delete a file that macOS says is in use, you can first use Terminal to check the locked file:
- Open the Trash folder.
- Hold down Cmd + Space to open Spotlight.
- Enter Terminal and hold Return.
- Enter Isof and hit Space. This command gives you a glimpse of a list of files in use in the background processes.
- Open Trash and yank the file you want to force-delete to the Terminal.
- Hit Return to launch the command.
For locked files, you can also go to Trash and free them up by doing the following:
- Click on Trash.
- Right-click the target file.
- Select Get Info.
- Select the Locked checkbox.
- This should unlock the file and make it amenable.
- Alternatively, click the Empty key or right-click the file and select Delete Immediately.
5. Use the "Delete Immediately" Feature
For El Capitan, you can use immediately delete to annihilate a file contained in your Trash. Choose the file, press the Option key, click the file and then hit Delete Immediately to discard the file. It lets you skip many steps.
Delete Immediately only comes up in the Trash app. So click it and click the files you want to purge. Confirm the files have petered out.
6. Get Permission to Remove Files
Often, a user may not have the authority to remove a file. You need an Administrator to discard the file or get Read & Write permissions from Sharing & Permissions. If you cannot resolve the issue, we recommend you talk to Apple or an authorized Service Provider.
Conclusion
Sometimes, you can’t empty the Trash while a file or application is in use or other reasons. One of the methods highlighted above should help if you get hit by this "The operation can’t be completed because the item is in use" error.
As noted above, you can resort to a Mac dedicated tool like PowerMyMac to remove unwanted apps along with their remnants. It’s pretty helpful for errant files or apps that won’t just go away.
We hope you applied the tips in this article to trace the evasive file and successfully removed it. Please get in touch if you have any queries using comments below!
Ed2023-08-18 15:26:12
Having grown up in a Windows world, I'm OK at DOS commands. But I suck at anything similar in the Mac world. Thanks for making this so easy.