When you drag a file into the Trash on your Mac and click “Empty Trash,” macOS usually deletes the contents instantly. However, occasionally the process will abruptly halt, and a warning box will appear stating: “The operation can’t be completed because the item [Filename] is in use.”
This happens when a background application (or the macOS system itself) secretly holds an open memory lock on the file. Even if you have closed all visible applications, a hidden background process might still be referencing the document. Restarting your Mac usually releases the lock, but if you don’t want to reboot, you can use a powerful Terminal command to bypass the software lock and forcefully obliterate the file.
How to Safely Bypass Mac ‘Item is in Use’ Trash Errors
You must use the rm (remove) command in the Terminal to forcefully delete the locked file.
- Open the Finder, go to Applications, open the Utilities folder, and double-click Terminal.
- In the Terminal window, carefully type the following command, ensuring you leave a single space at the very end. Do not press Enter yet.
sudo rm -rf - Now, click on the Trash icon in your Mac’s Dock to open the Trash folder.
- Find the stubborn, locked file that refuses to delete.
- Click and drag the locked file from the Trash window directly into the Terminal window.
- When you let go of the mouse button, the Terminal will automatically type the exact, complex file path of the locked item (e.g.,
sudo rm -rf /Users/Name/.Trash/locked_file.mp4). - Now, press Enter in the Terminal window.
- Because you used the
sudo(superuser) command to bypass the system locks, the Terminal will ask for your Mac login password. Type it in (the characters will remain invisible) and press Enter again.
The terminal will instantly bypass the background application lock and forcefully erase the file from your solid-state drive at the kernel level. Look back at your Trash folder; the stubborn file is permanently gone.