Skip to content

Automated scripts for setting up newly installed macOS for daily software development work, plus a nice-looking terminal.

Notifications You must be signed in to change notification settings

rivernews/macos-reinstall

Repository files navigation

When System Performance Deteriorates...

https://www.cipher-it.co.uk/wp-content/uploads/2017/11/ITCrow.jpg image

After many years of using all kinds of system, Windows, Mac included, the golden rule does not change.

The new recent Windows version are more self-sustainable? Mac OS does a great job at recycling garbage files that pile up over time? Performance does not degrade over time? All bull shit.

We all age, so do laptops and systems. How can we retain the blazing fast performance we enjoyed on day 1 - the day the laptop shipped and arrived?

How to stand at the unbeatable position for your entire lifespan? The only solution is just obvious:

Master Reinstalling OS!

Don't rely on local data, everything cloud please (or external drive, if privacy is a concern), if you have any important data that you can't afford losing.

To the rescue: Mac reinstall automation script

We try to address the tedious reinstallation work by providing scripts that quickly sets up your mac (M1) laptop for software development work.

See the section "How to use" below to see how to run the scripts.

Issue: system occupying too much storage

If you just have reinstalled awhile ago and your problem is just storage, you might not need reinstall, you can try to clean up your storage first.

If you're using BigSur, there're useful tools in "About this mac > storage > manage..." to clean up your disk space.

Due to misterious reason (or just poorly developed app). Good way to analyze storage is to run du -d 1 -x -c -g /. See this post.

Let's backup to prep for reinstall

Reminder:

  • Personal files and data
    • Download, Desktop folder
  • Voice memo
  • Local git repository
    • Secrets that are git ignored.
    • Remaining git commits that aren't pushed to remote yet?
  • App configs like
    • Visual Studio Code settings, keyboard map - back up by uplaoding the settings by Setting Sync extension

Creating bootable USB

See Apple Website for latest OS commands.

Steps

  1. Download the OS from App Store. (Press GET) Then quit.

  2. Run sudo /Applications/Install\ macOS\ Mojave.app/Contents/Resources/createinstallmedia --volume /Volumes/MyVolume. " MyVolume is the name of the USB flash drive or other volume you're using. If it has a different name, replace MyVolume accordingly." (Apple)

Clean install from USB

This works for Mojave 10.14.6

Prequisite:

  1. Make sure you allow booting from external drive.
    • Hint: Long press "cmd + R", then choose "Startup Security Utility".
  2. Make sure you turn off hardware protection.
  3. Make sure you disable T2 chip security (for Macbook pro later than 2018) Please google for how to do this.

Steps:

  1. Have your boot usb pluged in
  2. Restart laptop, and long press option. (for M1 MBP: long press power button for disk utility wipe as well as boot from USB)
  3. Will show booting options, choose USB (should be something like Mojave Install).
  4. Will using USB to boot now. Then select disk utility. Erase the main disk.
  5. Quit and go back to the main menu, now this time select Install Mojave.
  6. Follow the steps.

Credits.

Bonus

  1. You can also consider using a SSD to setup the installer, see this post.

How to use

Run automation scripts

  • Install command line tools first
    • Try to git clone this repository, mac will prompt you then. Note: even if you download Xcode and run it the first time, brew installation still requires you to install the command line tool again. So better just let the prompt guide you.
  • Run scripts to install necessary tools and apps:
sh ./macos-install.sh
cd beautify-terminal-10k
sh ./install-10k.sh
  • Basic set up apps config
    • Visual Studio Code: install Sync Setting extension to restore settings and keyboard mappings. Can also manually input the gist and tokens - Ours is stored at google doc, please use your own!
    • Open Google Drive to turn it on

Setup System preferences

  • Configure for trackpad
    • increase mouse pointer speed
    • enable App Expose - use 4 fingers
    • drag in accessibility
  • Configure keyboards
    • Add other languages needed
  • Configure system bar icons "always show"
    • For volume, also enable "play feedback sound when volume is changed"
    • For bluetooth
  • Internet account - enable for contact app, ... etc.
  • Cleanup dock app icons, remove infrequently used ones
  • Sharing - Change computer network name
  • Disable iCloud drive
    • Disable photo
  • Always open window in Tab

About

Automated scripts for setting up newly installed macOS for daily software development work, plus a nice-looking terminal.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages