KISS 🇺🇦

Stop the war!

Stop the war in Ukraine! Fuck putin!

More information is at: https://war.ukraine.ua/.

There is a fund to support the Ukrainian Army: https://savelife.in.ua/en/donate/, and there is a special bank account that accepts funds in multiple currencies: https://bank.gov.ua/en/about/support-the-armed-forces. I donated to them. Please donate if you can!

Killer putin

Killer putin. Source: politico.eu.

Arrested putin

"It hasn't happened yet, but it will happen sooner or later. Beautiful photo, isn't it?" Source: twitter.

Segregating useless built-in OS X 10.15 applications

| comments

Do you still want to move away useless built-in apps on OS X 10.15? It has changed the OS layout on the filesystem so that the built-in applications are in /System/Applications/ instead of /Applications/ now. That area is also more protected, so we’ll need to add an extra step to move away that crap.

Initial move

Even though all applications are still shown to be in /Applications/ in Finder, the system ones are actually in /System/Applications/:

1
2
3
4
5
6
7
8
9
10
11
$ ls /Applications
Safari.app    Utilities
$ ls /System/Applications
App Store.app     FaceTime.app        Messages.app        Preview.app     TextEdit.app
Automator.app     FindMy.app      Mission Control.app QuickTime Player.app    Time Machine.app
Books.app     Font Book.app       Music.app       Reminders.app       Utilities
Calculator.app        Home.app        News.app        Siri.app        VoiceMemos.app
Calendar.app      Image Capture.app   Notes.app       Stickies.app
Chess.app     Launchpad.app       Photo Booth.app     Stocks.app
Contacts.app      Mail.app        Photos.app      System Preferences.app
Dictionary.app        Maps.app        Podcasts.app        TV.app

That /System/ directory is located on a separate partition, which is mounted read-only by default:

1
2
3
4
$ cd /System/Applications
$ sudo mkdir junk
Password:
mkdir: junk: Read-only file system

That’s why first you need to disable SIP, then remount / as read-write:

1
2
$ sudo mount -uw /
$ sudo mkdir junk

And now we can move junk apps to that new directory:

1
$ sudo mv Chess.app Contacts.app FaceTime.app FindMy.app Home.app Launchpad.app Maps.app Messages.app Music.app News.app Photo\ Booth.app Photos.app Podcasts.app Siri.app Stickies.app Stocks.app TV.app VoiceMemos.app junk

It’s interesting that remounting / back as read-only doesn’t work; you need to reboot to do that.

1
2
3
$ sudo mount -ur /
mount_apfs: volume could not be mounted: Invalid argument
mount: / failed with 66

If you don’t want to do any other system modification at this time, it’s a good idea to reenable SIP.

Note: If you’re upgrading from OSX 10.14, you may want to move /Applications/junk/ to /System/Applications/junk/ to be consistent instead of creating a new directory as described above.

Upgrades

It’s very likely that you’ll need to move pieces of those apps to junk/ after a system upgrade. Here’s an example upgrade from 10.15 build 19G73 to 19H15.

We can find the apps that need to be moved again (this is just an informative step, you don’t have to do it):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
$ comm -12 <( \ls -1 /System/Applications/junk ) <( \ls -1 /System/Applications )
Chess.app
Contacts.app
FaceTime.app
FindMy.app
Home.app
Launchpad.app
Maps.app
Messages.app
Music.app
News.app
Photo Booth.app
Photos.app
Podcasts.app
Siri.app
Stickies.app
Stocks.app
TV.app
VoiceMemos.app

And the command to cleanup the junk is:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
$ ( IFS=$'\n'; for a in $( comm -12 <( \ls -1 /System/Applications/junk ) <( \ls -1 /System/Applications ) ); do sudo rsync -av /System/Applications/{,junk/}"$a"/ && sudo rm -rf "/System/Applications/${a}"; done )
building file list ... done
./
Contents/
Contents/Info.plist
Contents/version.plist
Contents/MacOS/
Contents/MacOS/Chess
Contents/Resources/
Contents/Resources/sjeng.ChessEngine
Contents/_CodeSignature/
Contents/_CodeSignature/CodeResources

sent 577372 bytes  received 160 bytes  1155064.00 bytes/sec
total size is 576768  speedup is 1.00
Contents/Resources/Base.lproj/Intents.intentdefinition
Contents/_CodeSignature/
Contents/_CodeSignature/CodeResources

sent 2980061 bytes  received 306 bytes  1986911.33 bytes/sec
total size is 2978536  speedup is 1.00

Hurray, it looks better now:

1
2
3
4
5
$ ls /System/Applications
App Store.app     Calendar.app        Mail.app        QuickTime Player.app    Time Machine.app
Automator.app     Dictionary.app      Mission Control.app Reminders.app       Utilities
Books.app     Font Book.app       Notes.app       System Preferences.app  junk
Calculator.app        Image Capture.app   Preview.app     TextEdit.app

Finally you can killall Dock to restart Dock, otherwise it’ll keep showing those apps with a gray icon.

Comments