Updated: 2021-10-06

SIP(System Integrity Protection) is enabled by default since El Capitan

$ csrutil status
System Integrity Protection status: enabled.

How to Delete Software on macOS

Unlike Windows, there's no Registry in macOS, so programs can be directly deleted.

  • /Applications: software programs, apps can be directly deleted from here
  • /Library and ~/Library: user preferences and resources


  • System Library: /System/Library
  • Local Library: /Library
  • User Library: ~/Library

Wired memory

Critical information stored in RAM by the system, its kernel, and some key application components. This stuff is basically frozen – it allocates its space and never moves to the hard drive or gets replaced with user-level data when RAM becomes scarce. An interesting thing to note about wired memory is that it scales based on how much total system memory is installed. For example, a Mac with 1GB of RAM may show 400MB of wired memory, while a Mac with 4GB of RAM may use 700MB. The more memory you have, the more your Mac wants to use it!

Apple Open Directory


terminal page up or down: fn+up or fn+down

Read NTFS Portable HardDrives

Use Paragon NTFS for Mac


There are 3 Library folders:

  • /System/Library
  • /Library
  • ~/Library

E.g. download JDK/JRE dmg file from here, Java JDK/JRE will be installed in /Library folder: /Library/Java/JavaVirtualMachines/jdk1.7.0_72.jdk


$ ps -e | grep md

Path in Mac

Xcode Dev Tools


Set JAVA_HOME in Mac OS X::

export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home

Load ~/.bash_profile

  1. run
$ source ~/.bash_profile
  1. or run
$ bash
  1. or change default setting to bash:

Terminal->Preferences->Shells open with->change Command to "/bin/bash"

Mac OS X Package manager

Mac homebrew

Mac OS Commands


List the contents of an installer's bom (bill of materials) file. This can be used to find out what files an installer will add/replace in your system before running it. It can also list details of a previous install.

$ lsbom -fls  /private/var/db/receipts/ | (cd /; sudo xargs rm)

Mac OS X empty trash

$ sudo rm -rf ~/.Trash/*

Apple Silicon

Check if your software is ready for Apple silicon:

Rosetta 2: announced in 2020, to aid in the Mac transition to Apple silicon. The software permits many applications compiled exclusively for execution on x86-64-based processors to be translated for execution on Apple silicon.

Universal 2 binary format: also introduced in 2020, allows applications to run on both Intel x86-64-based and ARM64-based Macintosh computers, to enable the transition to Apple silicon.

(Why 2? 1 was for transition from PowerPC to Intel)