Four things cause this error, and you can tell them apart in about thirty seconds. The file is open in a running process. The file is locked. You don't have permission to change it. Or it belongs to macOS itself and was never yours to move. The wording macOS gives you — usually "The item can't be moved to the Trash because it can't be deleted" or "The operation can't be completed because the item is in use" — tells you almost nothing about which one you've hit, so start with the triage below rather than working down a list of fixes in hope.

Thirty-second triage

Select the file and press Command-I to open Get Info, then look at two things.

Is the Locked checkbox ticked? That's cause two, and it's a five-second fix. Now expand Sharing & Permissions at the bottom. If your account is listed with Read & Write, permissions aren't your problem. If it says Read only, or the owner is system or wheel, you're in cause three or four.

If Locked is clear and you have Read & Write, the file is almost certainly in use — cause one, the most common of the four by a wide margin. And if the item lives inside /System, stop reading: that's cause four, it isn't deletable by design, and nothing in this guide will change that.

1. The file is in use

macOS won't move something to the Trash while a process holds it open. The process is often not the app you'd expect — Spotlight indexing, a backup, a preview window, or a helper belonging to an app you thought you'd quit.

Work through these in order:

  1. Quit the obvious app properly. Command-Q, not just closing the window. Closing the last window doesn't quit a Mac app.
  2. Force quit it. Apple menu › Force Quit, select the app, click Force Quit. Apple documents this in How to force an app to quit on Mac. You'll lose unsaved changes in that app, so save elsewhere first.
  3. Find what's actually holding it. Open Activity Monitor (Applications › Utilities) and search for the app or file name. Anything that matches — including background helpers with unfamiliar names — is a candidate. Select it and use the stop button in the toolbar.
  4. Relaunch the Finder. Hold Option and right-click the Finder icon in the Dock, then choose Relaunch. This clears the case where the Finder itself is the process still referencing the file.
  5. Restart the Mac. Unsatisfying, and it resolves a large share of these. Nothing is holding a file open immediately after a restart except something set to launch at login — which is what the next section is for.

2. The file is locked

A locked file can be moved to the Trash, but macOS makes you confirm it. Apple's own guidance is direct: if an item is locked, you need to confirm you want to move it to the Trash, or unlock it first. So if you're seeing a confirmation dialog rather than a refusal, just click Continue.

To unlock it instead: select the file, press Command-I, and untick Locked near the top of the Get Info window. For a folder full of locked items, open Get Info on the enclosing folder and use the gear menu › Apply to enclosed items after changing permissions.

Files usually arrive locked for a reason — they came from a read-only disk image, a backup, or a shared drive. Unlocking is safe; the lock flag is a guard rail, not a security boundary.

3. You don't have permission

This one shows up as a Read only entry for your account in Get Info, or a request for a password you weren't expecting. It's common with files copied from another Mac, restored from a backup, or created by a different user account on the same machine.

In the same Get Info window, expand Sharing & Permissions and click the padlock at the bottom right. Apple's phrasing on deleting files and folders is that if you're not logged in as an administrator, you may need to click the lock to unlock it, then enter an administrator name and password. Do that, set your own account to Read & Write, and try again.

If the file is in a folder inside another user's home directory, this is working correctly. Don't force it.

4. It's owned by root, or protected by macOS

Apps installed by an installer package rather than dragged from a disk image sometimes end up owned by root. Antivirus tools, VPN clients, printer drivers and virtualisation software are the usual suspects, and they frequently install a launch daemon and a login item alongside the app bundle.

Two things matter here.

First, if the app came with an uninstaller, use it. Dragging a root-owned app to the Trash removes the visible part and leaves the daemon running, which is how people end up with a menu bar icon for software they're certain they deleted. Check the app's own support page or the disk image it came from.

Second, if the item is inside /System, it's covered by System Integrity Protection and the refusal is the feature working. Apple's System Integrity Protection documentation explains that only processes signed by Apple with specific entitlements can modify those locations. Turning SIP off to delete a file is a bad trade, and the file almost certainly isn't the thing causing your problem.

If the file is on an external drive or a network share

This is cause three wearing a disguise: the problem is the volume, not the file, and the usual permission fixes do nothing.

Select the drive on your desktop or in the Finder sidebar and press Command-I. Look at Format. If it says NTFS, macOS mounted the volume read-only — that's the default, and no amount of unlocking padlocks will let you delete anything on it. Copy off what you need and reformat the drive, or do the deletion from a Windows machine.

If the format is fine but the files came from someone else's Mac, look further down the same Get Info window for Ignore ownership on this volume and tick it. That tells macOS to stop enforcing the original owner's user ID, which is what's blocking you when a drive moves between machines. Use it on your own external drives; leave it alone on a shared one.

On SMB and AFP network shares there's often no Trash to move things to at all. The Finder will offer to delete immediately instead, and that deletion is permanent — no Trash means no undo. Read that dialog properly before clicking through it.

When the Trash itself won't empty

If the file made it into the Trash but the Trash won't empty, the same in-use rule applies — something is still holding one of the items. Quit the app you used the file with, then try again; if that fails, restart and try again.

When it still fails, the holder is usually a login item or startup item, which restarts with you. Apple's fix is to boot into safe mode, which stops those items from loading: on an Apple Silicon Mac, shut down fully, hold the power button until "Loading startup options" appears, pick your volume, then hold Shift and click Continue in Safe Mode. Apple's safe mode page has the Intel steps too. Empty the Trash there, then restart normally.

If even safe mode refuses, the file may sit on a damaged volume. Boot to macOS Recovery, open Disk Utility, select the disk and run First Aid before trying anything more aggressive.

What not to do

Don't reach for sudo rm -rf. It's the top answer in half the forum threads on this error and it's the wrong tool. rm doesn't use the Trash — there is no undo, no recovery, and no confirmation. A stray space in the path is enough to delete something you needed, with root privileges and no record of what went. Every other fix in this guide is reversible. That one isn't, and the cost of getting it wrong is a restore from backup, assuming you have one.

Don't disable SIP to remove a file in a protected location, and don't run a "permissions repair" utility from an unfamiliar vendor. Neither addresses any of the four causes.

Don't delete the app and stop there if it installed a daemon or login item. You'll have removed the part you can see and kept the part that runs.

The case nobody writes about: it comes back

You delete the app, empty the Trash, and days later it's back — or its menu bar icon is. That's not a delete failure, it's a background component you never removed: a launch agent in ~/Library/LaunchAgents, a login item, or an updater helper that reinstalls its own app. The delete worked. The reinstall undid it.

Check System Settings › General › Login Items & Extensions for anything belonging to the app, disable it there, then remove the app again. Our guide on finding app leftover files covers the Library paths where these hide and how to match them to the app they came from by bundle ID.

FAQ

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

Because the file is open in a running process, it's locked, your account doesn't have write permission, or it belongs to macOS and is protected. Open Get Info with Command-I: the Locked checkbox and the Sharing & Permissions section identify which one within a few seconds.

How do I delete a file that says it's in use?

Quit the app with Command-Q, then force quit it from the Apple menu if that doesn't work. If the file still won't move, search for its name in Activity Monitor to find the process holding it and stop that. Relaunching the Finder or restarting resolves most of what's left.

How do I unlock a locked file on Mac?

Select it, press Command-I, and untick Locked in the Get Info window. For a whole folder, open Get Info on the folder and use the gear menu's "Apply to enclosed items" after changing permissions.

Should I use sudo rm -rf to force-delete the file?

No. rm bypasses the Trash entirely, so there's no undo if the path is wrong, and it's easy to get a path wrong. Every other approach here keeps the file recoverable. Use force-deletion only when you understand exactly what the path points at and you have a backup.

Why can't I delete an app in my Applications folder?

It's probably still running, including as a background helper, or it was installed by a package with root ownership. Quit it, check Activity Monitor, and look for a vendor-supplied uninstaller before trying to drag the bundle out.

The app keeps coming back after I delete it. Why?

A launch agent, login item or updater helper survived the delete and reinstalled it. Check System Settings › General › Login Items & Extensions, disable anything belonging to the app, then remove the app again.

Related guides

Related

How to completely uninstall an app on Mac

Why dragging to the Trash leaves files behind, and how to find and remove them without breaking anything.

Read guide

Related

How to find and remove app leftover files on a Mac

Where deleted apps leave files behind, how to identify the real orphans, and what to never touch.

Read guide

Related

What is safe to delete on a Mac?

Which Mac files are usually safe to remove, which to leave alone, and how to free space without breaking apps.

Read guide