MacDiskCleaner LogoMacDiskCleaner

Mac Can’t Delete a File? How to Force Delete Locked and Stuck Files

Fix files that won’t delete on Mac: “item is in use”, permission errors, locked files and a Trash that won’t empty — Finder to Terminal.

Updated October 9, 2026 3 min read

Quick answer

If a Mac won’t delete a file, quit the app using it (or restart), unlock it in Get Info (⌘I → untick Locked), and check Sharing & Permissions. Then use Option-Command-Delete to delete it immediately, or hold Option while emptying the Trash. Files protected by macOS System Integrity Protection can’t — and shouldn’t — be deleted.

Ready to clean up your Mac?

Free to download. No account required to start.

Version 1.1.2 · 4.8 MB · macOS 14 or later · Apple Silicon & Intel

Download Free

When a Mac refuses to delete something, the error message tells you why — once you know how to read it. Work through the fixes below from top to bottom; most problems are solved in the first two steps.

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

An app still has the file open.

  • Quit the app that last used it (⌘ Q), not just its window.
  • If you don’t know which app, open Terminal and ask macOS:
lsof ~/Downloads/video.mov

The output names the process; quit it, or end it from Activity Monitor.

  • Still stuck? Restart your Mac and delete the file before opening anything else.

2. The file is locked

Locked files can’t be moved to the Trash (or the Trash asks for confirmation every time).

  1. Select the file and press ⌘ I (Get Info).
  2. Untick Locked under General.
  3. Delete it as usual.

For many files at once, Terminal removes the lock flag:

chflags -R nouchg ~/Desktop/OldProject

3. “You don’t have permission” errors

You need write permission for the file and for the folder that contains it.

  1. Press ⌘ I on the file (or its folder).
  2. At the bottom, open Sharing & Permissions, click the padlock and enter your password.
  3. Set your user to Read & Write, then try again.

Files copied from another Mac, an external drive or a backup often carry the old owner’s permissions — this fixes most of them.

4. Use “Delete Immediately”

When the Trash itself is the problem, skip it: select the file and press ⌥ ⌘ ⌫, then confirm. See our permanent delete shortcut guide for all the options.

5. Restart in Safe Mode

Safe Mode loads only what macOS needs, so nothing else can hold your file open — and it clears some system caches.

  • Apple silicon: shut down, press and hold the power button until “Loading startup options” appears, select your disk, hold ⇧ and click Continue in Safe Mode.
  • Intel: restart and hold ⇧ until the login window appears.

Delete the file, then restart normally.

6. Force delete from Terminal (last resort)

rm -f ~/Downloads/stubborn-file.zip

Terminal deletes permanently, with no Trash and no confirmation. Double-check the path; never run rm on anything in /System, /Library or a folder you don’t recognise. Prefixing sudo gives it administrator rights — only use that for files you created yourself in a protected location.

Do it in one scan with MacDiskCleaner

Finds junk, duplicates and large files across your Mac, shows everything for free, and moves what you choose to the Trash first — so nothing is lost by mistake.

Version 1.1.2 · 4.8 MB · macOS 14 or later · Apple Silicon & Intel

Download Free

The Trash won’t empty

  • Hold Option while choosing Empty Trash (or press ⌥ ⇧ ⌘ ⌫). This skips locked-item warnings.
  • Unlock any locked items inside the Trash (Get Info → untick Locked).
  • Eject disks or USB drives whose files are in the Trash — or empty the Trash with the drive connected, because files from external drives stay on that drive.
  • Restart, then empty the Trash again.
  • Still failing? Run Disk Utility → First Aid on your startup disk to repair directory errors.

More options are in our empty Trash guide.

Files you should not force delete

Some files can’t be removed because macOS protects them with System Integrity Protection (SIP) — anything in /System, /usr (except /usr/local) and the apps that ship with macOS. Don’t disable SIP to delete them: they are part of the operating system, and removing them can stop your Mac from starting. If you think system files are taking up space, it’s almost always caches, snapshots or backups instead — see what’s really inside System Data.

A safer way to remove what you don’t need

Most “I can’t delete this” moments happen while cleaning up space. MacDiskCleaner lists junk, duplicates and large files with their exact locations, skips protected system paths automatically, and moves what you choose to the Trash — so you can clean without fighting Finder errors.

Frequently asked questions

How do I force delete a file on Mac?

Quit any app that might use it, unlock it in Get Info, then select it and press Option-Command-Delete. If that fails, restart (or start in Safe Mode) and try again. As a last resort, Terminal’s rm command deletes it permanently.

Why does my Mac say the item can’t be moved to the Trash?

Usually the file is locked, you don’t have write permission for it or its folder, or it is part of macOS and protected by System Integrity Protection.

How do I delete a locked file on Mac?

Select it, press Command-I, untick Locked, then delete it. In Terminal, chflags nouchg followed by the file path removes the lock.

How do I find which app is using a file?

In Terminal, run lsof with the file path (for example lsof ~/Downloads/video.mov). It lists the process holding the file open; quit that app or process.

Should I turn off System Integrity Protection to delete a file?

No. Files protected by SIP are part of macOS; deleting them can stop your Mac from starting. If a protected file seems to take up space, the cause is almost always something else.

Ready to clean up your Mac?

Free to download. No account required to start.

Version 1.1.2 · 4.8 MB · macOS 14 or later · Apple Silicon & Intel

Download Free

Related guides

All guides