Home Knowledgebase KB-356

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.

Quick Tip: Need immediate assistance? 💻 Open a Ticket

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:

  1. Close all open applications: Ensure any app that might have accessed the file is completely quit (Command + Q).
  2. Relaunch Finder: Hold the Option key, right-click the Finder icon in the Dock, and select Relaunch.
  3. 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.

  1. Open Terminal (found in Applications > Utilities).
  2. Type the following command, but do not press Enter yet: lsof (ensure there is a space after the f).
  3. Locate the file or folder in Finder and drag it directly into the Terminal window. This will automatically paste the exact file path.
  4. Press Enter.
  5. Analyse the output. Under the COMMAND column, you will see the name of the process using the file.
If the command returns a list, the application listed is what you need to close. If it returns nothing, the lock may be held by a system-level daemon.

Method 2: Force Quitting the Responsible App

Once you have identified the application causing the conflict, you can force it to close:

  1. Press Command + Option + Escape to open the Force Quit Applications window.
  2. Select the application identified in the previous step.
  3. Click Force Quit and confirm the action.
  4. 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.

  1. Shut down your Mac completely.
  2. 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.
  3. For Intel Macs: Turn on the Mac and immediately press and hold the Shift key until the login window appears.
  4. Once logged in, try to empty the Trash.
  5. 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.

Avoid using third-party "Force Delete" utilities from untrusted sources, as these can occasionally corrupt the file system directory if not handled correctly.

Permission Conflicts

Occasionally, this error is a generic response to a permissions issue rather than a file lock.

  1. Right-click the file and select Get Info.
  2. Expand the Sharing & Permissions section at the bottom.
  3. Ensure your user account is set to Read & Write.
  4. 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?

Need more help? If the issue persists after trying these steps, please open a support ticket and our team will assist you.

💻 Open a Ticket