How delete an application that is bundled with macOS? [duplicate]

Backstory:

I am running macOS Sierra and use TextEdit a lot. The problem is that I hate the Versions save schema that causes the universal Save As shortcut of CmdShiftS to instead create a copy of the document. I also hate how Auto-Save makes permanent changes to documents I don't want to modify when I'm tentatively modifying a work-in-progress. Since the introduction of these nuisance features in Lion I have always backed up and then replaced TextEdit.app with the legacy 1.6 version from Snow Leopard.

The problem:

Today when I tried to delete TextEdit.app from my Applications folder using this Terminal command

sudo rm -rf /Applications/TextEdit.app

I got this error

rm: TextEdit.app: Operation not permitted

I was surprised to find that I can't kill it, even with sudo.

How can I actually get rid of an application that is bundled with macOS?

What I've tried so far:

I followed the instructions in this article, but it didn't work. I also read this SE answer, which almost accomplishes the same solution by means of disabling Versions and Auto-Save, but then I don't get the benefit of legacy TextEdit's temporary backup saving feature. See the part in the answer stating "This effectively disables the old-style, pre-Lion autosaving completely".

So I think deleting the newer TextEdit v1.12 and replacing it with the legacy v1.6 is still the best option, however I can't get my system to delete it. Any help appreciated.


Solution 1:

Apple's apps in /Applications and /Applications/Utilities as well as some other usually invisible system files and folders are protected by System Integrity Protection in El Capitan and later. You have to disable SIP temporarily to remove apps fallen into disgrace.

  1. How do I disable System Integrity Protection (SIP) AKA “rootless” on OS X 10.11, El Capitan?
  2. Reboot to your main system and remove the app with sudo rm -rf /Applications/TextEdit.app.
  3. Enable SIP again by booting to Recovery Mode gain but entering csrutil enable in Terminal.app.

After a system update or upgrade TextEdit may reappear because it was updated.