OS X is a nice and (mostly) stable operating system overall. However Apple puts so much crap and junk that may not be for everyone and that cannot be officially uninstalled. There is a bunch of standard applications and there is also a lot of standard daemons, some of which are trying to get network access to contact Apple (keyboardservicesd, studentd, seriously?!).
I don’t like having unnecessary stuff in my system and would prefer to get rid of it. I’m not sure about removing built-in applications completely, unfortunately that may have bad consequences to the stability of the system. But at least when I open the /Applications/ directory, I don’t want to see them. So a simple solution is to move them to /Applications/junk/.
The set of applications that are useless (junk) for you is your personal choice. For example: FaceTime, Home, Messages, News, Photo Booth, Siri, Stickies, Stocks. This post is how to move them away.
Note: this guide is for OS X 10.14 because 10.15 has changed the system layout and the process is more involved now. There will be another post on that.
A friendly reminder: Make a backup before doing these changes.
Initial move
Create /Applications/junk:
12
$ cd /Applications
$ sudo mkdir junk
Simple moving doesn’t work, even as root (of course Apple doesn’t like us moving their precious useless apps):
If for some reason you have those apps in the Dock, they will be displayed as question marks after this, so remove them from the Dock.
If you don’t want to do any other system modification at this time, it’s a good idea to reenable SIP.
Upgrades
System upgrades, including security updates, often bring changes to some files of these applications, so you’ll get the old version in junk/ and a partial application in /Applications/, which will very likely not work. You need to remember to move all those new files to the corresponding directories in junk/. I’ll show you one command to do that, after an example upgrade from 10.14 build 18G103 to 18G8022.
To go step by step, first we can find all the applications that have new files and should be moved:
The comm command compares all applications in /Applications/junk/ and /Applications/ and prints only those which are present in both directories. The \ls uses a backslash prefix to use the standard ls command without any aliases.
Then we need to iterate over the list properly because applications can have spaces in the filenames (sigh), which can be done by setting the input fields separator to \n:
123456
$ (IFS=$'\n';for a in$( comm -12 <(\ls -1 /Applications/junk/ ) <(\ls -1 /Applications/ ));doecho"$a";done)Maps.app
Messages.app
News.app
Photo Booth.app
Photos.app
And finally we arrive at the command to copy the new files and remove the applications: