Mac Cheatsheets

Schedule a sleep/wake/shutdown/restart/poweron/wakeorpoweron

  • M = Monday
  • T = Tuesday
  • W = Wednesday
  • R = Thursday
  • F = Friday
  • S = Saturday
  • U = Sunday
sudo pmset shutdown "01/01/2017 05:00:00"
sudo pmset repeat restart MTWRFSU 01:00:00

All schedules are stored in the following file


CPU Throttling

# To turn off CPU throttling
sudo sysctl debug.lowpri_throttle_enabled=0

# To turn on CPU throttling, this is by default
sudo sysctl debug.lowpri_throttle_enabled=1

List all packages

pkgutil --packages

List packages with a filter

pkgutil --packages | grep -i your_keyword

Get the location of a package

sudo pkgutil --pkg-info name_of_the_package

Delete the packages

sudo pkgutil --forget name_of_the_package

Remove/Delete all the files in that package

pkgutil --only-files --files name_of_the_package.pkg | tr '\n' '\0' | xargs -n 1 -0 sudo rm -f

Remove/Delete all the folders including the package folder

pkgutil --only-dirs --files the-package-name.pkg | tail -r | tr '\n' '\0' | xargs -n 1 -0 sudo rmdir

Comments are closed