the app will not go in the trash

updated · by

macOS almost never refuses without a reason, and the reason is nearly always one of five. work down them in order — they are sorted by how often each turns out to be it — and stop at the one that matches. two commands tell you which one you are in before you start guessing, and both are below. the last resort you have read about, deleting the app as root in Terminal, is at the bottom of this page, and on one of these five it does not work at all.

one: the app is still running, even when it looks closed

«the item can't be moved to the Trash because it's open» means exactly what it says, and closing the window is not quitting the app. more often it is not even the app you are looking at — it is a helper it left running.

  1. quit it properly with ⌘Q, and if it will not, force quit: ⌥⌘⎋.
  2. open Activity Monitor and search for the app's name. quit anything that matches, including things with «helper», «agent» or «updater» in the name.
  3. check System Settings → General → Login Items & Extensions and remove it from both lists — a login item is relaunched the moment you kill it, which is why it feels like the app is fighting you.
  4. try the delete again.

which process is actually holding it

Activity Monitor only helps if you can guess the name, and the whole problem is often that you cannot. ask the file instead: point lsof at the executable inside the bundle — Contents/MacOS and the app's own name — rather than at the bundle itself, and you get the command and its process id, one line per holder.

aiming it at the whole bundle with +D answers too, but answers with everything: on an 850 mb app that is 270 lines, one per framework and asset the app has mapped, with the process you wanted somewhere inside. same second either way, so take the short answer.

helpers that keep themselves running usually live in the menu bar, and macOS 26 changed how they get there: what macOS 26 changed for menu bar apps

two: it is a system app, and that is not negotiable

Mail, Music, Notes, Maps, News, Stocks, Safari and their neighbours are protected by System Integrity Protection. the Finder will not delete them, Terminal as root will not delete them, and the answer is not a workaround — the disk is signed and sealed, and defeating that trades a stable Mac for an icon you did not want to look at.

Apple puts it plainly — «you can't use the Finder to delete apps that are required by your Mac»: delete or uninstall apps on Mac

how to tell a protected app from a locked one

the difference is visible from one command. run ls -lOd on the app and read the column after the group. a protected app answers root wheel restricted; one you installed yourself answers with your own name, admin, and a dash where the flag would be. that dash means nothing is holding the file down at the filesystem level, so the refusal is coming from one of the other four sections.

Safari is the odd one out: not a folder in /Applications at all but a symlink carrying restricted,hidden into /System/Cryptexes/App. csrutil status, in the ordinary Terminal, confirms the protection is on — enabled is what an untouched Mac says.

the flag is Apple's own mechanism, and its note is blunt about what that costs root: about System Integrity Protection on your Mac

what you can actually do is remove it from the Dock, and from Spotlight results in System Settings → Spotlight if it keeps turning up when you search.

and if it is Launchpad putting it in front of you every day, that is a habit you can drop instead: open your apps without Launchpad

three: the app is locked, or is not yours

  1. select the app, press ⌘I, and untick Locked at the top of the Get Info window.
  2. in the same window open Sharing & Permissions at the bottom. if your account is not listed with Read & Write, click the lock, authenticate, and give it that.
  3. if the app lives outside /Applications — in another user's folder, or on an external disk formatted for another system — move it somewhere you own first, then delete it.

the Locked tick is a flag called uchg

the same ls -lOd from the section above shows it: a locked item reads uchg where an ordinary one reads a dash. it is a BSD file flag, not a permission, and that distinction is the whole reason this section exists — you can own the file, hold read and write on it, and still be refused. chflags nouchg on the path clears it from Terminal if the Get Info tick is greyed out or the item is buried in the Trash.

a locked file is usually something restored from a backup or copied off a share; a permissions problem is usually an app installed by an installer that ran as a different user.

the mapping is not folklore — the Finder tick and the flag are the same switch, as Howard Oakley puts it: «to set the user Immutable flag, the same thing as the Finder lock» — protect files with the Locked or Immutable flag

an uninstaller reads those flags before it starts, which is the difference between a report and an error: app uninstaller

four: your employer installed it

if the app reappears after a reboot, or the Trash empties and it comes back, check System Settings → General → Device Management. an app delivered by a management profile is reinstalled by design, and there is no local fix — the profile has to be changed by whoever owns it.

the same is true of anything a corporate vpn, antivirus or backup agent installs alongside itself: those are usually a daemon plus a system extension, and removing the visible app leaves the invisible half running.

five: it went to the trash and the trash will not empty

  • something is still using a file inside. the lsof line from the first section works here too — point it at the copy in ~/.Trash rather than at /Applications.
  • empty the Trash with the ⌥ key held down to skip the checks that stop on a busy file. use it once you know why the file was busy, not instead of finding out.
  • if it is one item, right-click it in the Trash and choose Delete Immediately.
  • if it fails with a permissions error, the app was installed by an installer as root — see the third section, then try again.
  • still stuck: log out and back in. that closes every process you own without the drama of a reboot, and it is the step people skip on the way to restarting.

a Trash you cannot empty still counts against the disk, which is where a lot of missing space turns out to be: find out what system data is using

how hop deletes an app that will not delete

it does not get past any of the five. nothing does — a tool that claims to is either asking for your admin password or turning SIP off, and the restricted flag and the management profile beat every uninstaller equally. what changes is that you are told which of the five you are in, by name, rather than «error».

  • whatever macOS refuses to hand over is named with the reason. an uninstaller that always reports success is not doing better; it is telling you less.
  • an app already sitting in the Trash is still recognised — its identifier is read from the bundle there, or worked out from the leftovers that spell it out — so the removal you abandoned halfway can be finished properly instead of leaving its data behind forever.
  • everything goes to the Trash rather than being deleted, which matters most exactly here: when something is being stubborn, that is the moment people reach for the command that has no way back.

the same module also accounts for what an app left behind while you were fighting it: what the space a cleaner finds is made of

why sudo rm -rf will not delete a locked app

every thread on this eventually suggests removing the app as root from Terminal, and three of the pages above this one in Google hand you the line to paste. on the locked case it does not work, and you can watch it fail in about ten seconds.

make a file anywhere, run chflags uchg on it, and try. rm says «Operation not permitted» and exits with 1; rm -rf says the same; the file is still there afterwards. the account doing this owns the file and holds read and write on it, so there is no permission left to escalate to — the refusal is the flag, and a flag is cleared, not overpowered. chflags nouchg first, then delete, and it goes on the first try.

where it does run, the trade rarely comes with the command: no Trash, no confirmation, no way back, and a space typed in the wrong place removes something else at the same speed. untick Locked in Get Info instead and you get the same result with somewhere to restore from.

once it is finally gone, its data is still where it always was: uninstall an app with its leftovers

frequently asked questions

why does it say the app can't be moved to the trash because it is open?
a process from that bundle is still running. often it is not the app itself but a helper or updater it launched — lsof pointed at Contents/MacOS inside the bundle names the process and its pid, and Login Items & Extensions is where the persistent ones are registered.
how do i tell if an app is protected by macOS?
run ls -lOd on it and read the flags column. a protected app shows restricted and belongs to root; one you installed shows your name and a dash. Safari shows restricted,hidden because it is a symlink into /System/Cryptexes/App.
how do i delete an app that keeps coming back?
check Device Management for a configuration profile, and Login Items & Extensions for a helper that reinstalls it. an app that returns after a reboot is being put there by something with more authority than the Finder.
can i delete Safari or Mail?
no. they are on the signed system volume and protected by SIP. removing them means disabling that protection, which costs far more than the icon is worth.
the trash won't empty and won't say why. what now?
log out and back in, then try again — it releases every file your account was holding. if a single item is the problem, right-click it in the Trash and use Delete Immediately.
is sudo rm -rf safe for this?
on a locked app it is not even effective: the uchg flag refuses rm with «Operation not permitted» no matter what, and chflags nouchg is the step that is missing. where it does run, it deletes with no Trash and no undo, and a mistyped path takes something else just as fast.

the tool behind this

app uninstallerremove an app together with what it left in about thirty places.

done with uninstall apps

other things people do

about the author

Anton Shakirov, the author of hop

makes hop

makes hop and every page on this site. eighteen tools under a single menu bar icon, MIT licensed and open source. reads and answers issues and email himself.

download hopfree · macOS 14+ · Apple silicon and Intel