How to fix macOS Finder 'The operation can’t be completed because a file is open' errors
Summary
This guide helps you troubleshoot and resolve: How to fix macOS Finder 'The operation can’t be completed because a file is open' errors. Follow the steps below to fix the issue.
Common Causes
It can be frustrating when macOS prevents you from moving, renaming, or deleting a file because it believes the item is still being used by another application. This often happens when a background process has a "lock" on the file, even if the associated app appears to be closed.
Quick Fix Steps
Before attempting more complex solutions, try these rapid fixes to release the file lock:
- Close all open applications: Ensure any app that might have accessed the file is completely quit (
Command + Q). - Relaunch Finder: Hold the Option key, right-click the Finder icon in the Dock, and select Relaunch.
- Restart your Mac: This clears all temporary system locks and is the most reliable way to resolve the error.
Detailed Instructions
Method 1: Identifying the Locking Process via Terminal
If a restart is not feasible, you can identify exactly which application is holding the file open using the Terminal app.
- Open Terminal (found in Applications > Utilities).
- Type the following command, but do not press Enter yet:
lsof(ensure there is a space after the f). - Locate the file or folder in Finder and drag it directly into the Terminal window. This will automatically paste the exact file path.
- Press Enter.
- Analyse the output. Under the COMMAND column, you will see the name of the process using the file.
Method 2: Force Quitting the Responsible App
Once you have identified the application causing the conflict, you can force it to close:
- Press
Command + Option + Escapeto open the Force Quit Applications window. - Select the application identified in the previous step.
- Click Force Quit and confirm the action.
- Attempt to move or delete your file again.
Method 3: Clearing the Trash via Safe Mode
If the error occurs while trying to Empty Trash, a system extension may be preventing the deletion.
- Shut down your Mac completely.
- For Apple Silicon (M1/M2/M3): Press and hold the power button until "Loading startup options" appears. Select your disk, hold the Shift key, and click Continue in Safe Mode.
- For Intel Macs: Turn on the Mac and immediately press and hold the Shift key until the login window appears.
- Once logged in, try to empty the Trash.
- Restart normally to exit Safe Mode.
Troubleshooting
Dealing with Cloud Storage Sync Locks
If the file is located within a synced folder (such as OneDrive, Dropbox, or iCloud Drive), the sync engine may be uploading the file at the exact moment you try to move it.
- Right-click the cloud storage icon in the Menu Bar.
- Select Pause Syncing.
- Perform the file operation.
- Resume syncing.
Permission Conflicts
Occasionally, this error is a generic response to a permissions issue rather than a file lock.
- Right-click the file and select Get Info.
- Expand the Sharing & Permissions section at the bottom.
- Ensure your user account is set to Read & Write.
- Click the lock icon and enter your administrator password to make changes if necessary.
If these steps do not resolve the issue, please Open a Ticket and provide us with the output from the lsof command mentioned in Method 1.
Still Having Issues?
💻 Open a Ticket