Skip to main content

1. Comprehensive Backup Strategy

Before resetting, back up these critical items:

1.1. System Configuration Backup

# Create backup directory
mkdir ~/macos_backup
cd ~/macos_backup

# Save installed apps list
ls /Applications > installed_apps.txt

# Save system settings
system_profiler SPSoftwareDataType > system_profile.txt
defaults read > user_defaults.txt
networksetup -listallnetworkservices > network_config.txt

# Save directory structure
find ~ -maxdepth 3 -type d > directory_tree.txt

1.2. Development Files Backup

# Backup version manager configurations
cp -r ~/.nvm ~/macos_backup/nvm_backup
cp -r ~/.pyenv ~/macos_backup/pyenv_backup
cp -r ~/.conda ~/macos_backup/conda_backup

# Backup SSH/GPG keys
cp -r ~/.ssh ~/macos_backup/ssh_backup
cp -r ~/.gnupg ~/macos_backup/gnupg_backup

1.3. Full Disk Backup

  1. Connect external drive (2x your Mac’s storage)
  2. Go to  > System Settings > Time Machine
  3. Select backup disk and enable “Back Up Automatically”
  4. Click “Back Up Now” and wait for completion

2. Reset macOS (Erase & Reinstall)

(Follow same steps as previous guide for Recovery Mode and reinstallation)

3. Fast System Setup

(Follow same Welcome Assistant skipping steps as previous guide)

4. Developer Environment Setup

4.1. Install Homebrew (Package Manager)

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

# Add to PATH (Apple Silicon)
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zshrc
source ~/.zshrc

4.2. Core Development Tools

# Install using Homebrew
brew install --cask warp google-chrome miniconda

# Install CLI tools
brew install git nvm deno go

4.3. Python Ecosystem Setup

# Initialize Conda
conda init zsh
source ~/.zshrc

# Install UV (Fast Python installer)
pip install uv

# Create and activate Python environment
uv venv .venv
source .venv/bin/activate

4.4. Node.js Environment

# Configure nvm
mkdir ~/.nvm
echo 'export NVM_DIR="$HOME/.nvm"' >> ~/.zshrc
echo '[ -s "/opt/homebrew/opt/nvm/nvm.sh" ] && \. "/opt/homebrew/opt/nvm/nvm.sh"' >> ~/.zshrc
source ~/.zshrc

# Install Node.js
nvm install --lts
npm install -g npm@latest

4.5. Verify Installations

# Run verification script
echo "
=== Installation Report ===
Brew:       $(brew --version | head -n1)
Git:        $(git --version)
Warp:       $(warp --version)
Miniconda:  $(conda --version)
Python:     $(python --version | cut -d' ' -f2)
UV:         $(uv --version)
nvm:        $(nvm --version)
Node:       $(node --version)
npm:        $(npm --version)
Deno:       $(deno --version | head -n1)
Go:         $(go version)
Chrome:     $(/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --version)
" > install_report.txt

cat install_report.txt

5. Post-Installation Optimization

5.1. Configure Warp Terminal

  1. Launch Warp from Applications
  2. Sign in with GitHub for sync
  3. Enable GPU acceleration in Settings > Appearance
  4. Add shell integrations: warp integrations install

5.2. Chrome Development Setup

# Open Chrome with developer flags
open -a "Google Chrome" --args \
    --enable-features=ExperimentalJavaScript \
    --disable-site-isolation-trials \
    --auto-open-devtools-for-tabs

5.3. Create Development Workspace

mkdir -p ~/dev/{projects,scripts,repos,temp}
echo "export DEV_HOME=~/dev" >> ~/.zshrc

5.4. Restore Critical Backups

# Restore SSH/GPG keys
cp -r ~/macos_backup/ssh_backup/* ~/.ssh/
cp -r ~/macos_backup/gnupg_backup/* ~/.gnupg/

# Set proper permissions
chmod 700 ~/.ssh
chmod 600 ~/.ssh/*

Pro Maintenance Tips

Weekly Maintenance Script:
#!/bin/zsh
brew update
brew upgrade
brew cleanup
conda update --all -y
npm update -g
deno upgrade
go get -u all
Disk Cleanup:
# Remove system junk
sudo rm -rf /private/var/log/*
rm -rf ~/Library/Caches/*
Backup Automation:
  1. Configure Time Machine for hourly backups
  2. Sync critical code to GitHub/GitLab
  3. Use rsync for project backups:
rsync -avz --delete ~/dev/projects/ /Volumes/BackupDrive/dev_projects/

This guide provides:
  1. Comprehensive pre-reset backups
  2. Efficient macOS reinstallation
  3. Complete development environment setup
  4. Post-install optimization scripts
  5. Maintenance automation
The entire process takes 90-120 minutes but results in a clean, fully-configured development machine with version-controlled environments and backup systems.
I