Apple macOS Admin Playbook: Password Recovery, RecoveryOS, APFS Volume Erasure & CLI Triage
Complete field engineering reference for macOS system administrators, DevOps engineers, and ITAD refurbishment desks. Covers rescue workflows across Apple Silicon (M1 / M2 / M3 / M4) and Intel T2 Macs: lost administrator password recovery via resetpassword, the .AppleSetupDone temporary admin rescue workflow, direct Apple CDN full installer downloads, cryptographic APFS volume group erasure, DFU Revive/Restore, and live Terminal hardware triage.
1. Password Recovery & Administrator Account Rescue
Locked local accounts on FileVault-encrypted Macs or orphaned machines after employee offboarding are routine IT service desk incidents. Booting into macOS Recovery differs fundamentally depending on the silicon generation (Apple Silicon vs. Intel).
Cmd + R immediately.
Official Password Reset Assistant
Recovery GUILaunches Appleβs graphical Recovery Password Assistant from Terminal to unlock a FileVault volume and reset a local account password.
resetpassword
Golden Rescue: Remove .AppleSetupDone
Service Life-SaverDeletes the setup completion flag from Recovery Terminal. On reboot, macOS launches Setup Assistant to create a brand-new local admin account without wiping existing user data.
rm "/Volumes/Macintosh HD - Data/var/db/.AppleSetupDone" && reboot
Verify FileVault Encryption State
FileVault CLIInstantly checks whether FileVault full-disk encryption is active (On/Off) or currently encrypting/decrypting in the background.
fdesetup status
Rotate FileVault Personal Recovery Key
Recovery Key EscrowGenerates a fresh 24-character personal recovery key for escrow without decrypting and re-encrypting the APFS container.
sudo fdesetup changerecovery -personal
2. macOS Updates & Direct Apple CDN Full Installers
Bypassing the Mac App Store GUI is essential for fleet engineers. The native softwareupdate binary pulls full 12β14 GB .app OS bundles directly from Appleβs Content Delivery Network and builds offline bootable USB media.
Unattended Install of All Patches
Headless UpdateDownloads and installs all pending macOS security updates, Safari patches, and firmware updates silently via SSH or Terminal.
sudo softwareupdate -ia --verbose
Query Available Apple CDN Installers
Apple CDN CatalogQueries Appleβs production catalog for every full macOS build currently signed and downloadable (Sequoia 15, Sonoma 14, Ventura 13).
softwareupdate --list-full-installers
Fetch Specific Full macOS Installer
Direct .app FetchDownloads the exact official macOS installer bundle directly into /Applications/ without Apple ID sign-in.
softwareupdate --fetch-full-installer --full-installer-version 15.3
Build Bootable USB Flash Installer
createinstallmediaFormats the target USB drive and writes a bootable offline macOS installer in a single non-interactive command.
sudo /Applications/Install\ macOS\ *.app/Contents/Resources/createinstallmedia --volume /Volumes/MyUSB --nointeraction
3. Recovery Architecture & Emergency DFU Mode (Apple Silicon vs. Intel)
Apple Silicon boot security differs completely from legacy UEFI PCs or Intel Macs. Instead of Option-ROM firmware, startup trust is enforced by iBoot and the hardware Secure Enclave.
- 1TR (One True Recovery): Single long-press of the Power button β boots the primary signed RecoveryOS environment.
- 2TR (Fallback RecoveryOS): If primary Recovery is corrupted β double-press and hold the Power button to boot the hidden factory fallback partition!
Intel Mac Startup Key Combinations
Intel Boot KeysCmd+R (local Recovery) | Opt+Cmd+R (latest compatible macOS via Internet) | Shift+Opt+Cmd+R (original factory macOS).
Cmd+R | Opt+Cmd+R | Shift+Opt+Cmd+R
DFU Mode & Apple Configurator
Bricked Mac / Black ScreenWhen an Apple Silicon or T2 Mac shows a black screen after a failed bridgeOS/iBoot update, connect USB-C to the dedicated DFU port from a host Mac running Apple Configurator. Use Revive (preserves APFS data) before Restore.
Apple Configurator β Actions β Advanced β Revive Device
Select Default Startup Disk via CLI
systemsetupSets the designated APFS volume as the persistent boot target across reboots.
sudo systemsetup -setstartupdisk /Volumes/Macintosh\ HD
Force Automated MDM Enrollment Sync
Jamf / Intune / KandjiForces macOS to re-check Apple Business Manager (ABM/ADE) and renew enterprise MDM enrollment profiles.
sudo profiles renew -type enrollment
4. APFS Formatting & Volume Management (diskutil)
Apple File System (APFS) dynamically shares blocks across volumes inside a single container. Since macOS Big Sur, the operating system resides on a cryptographically sealed read-only SSV (Signed System Volume), while all mutable state lives on Macintosh HD - Data.
Macintosh HD - Data volume group or use Erase Assistant!
Inspect APFS Containers & Volumes
diskutilDisplays physical NVMe namespaces alongside synthesized APFS containers (System, Data, Preboot, VM, Recovery).
diskutil list && diskutil apfs list
Delete User Data Volume Safely
Clean Reinstall PrepCleanly removes the user data volume while preserving Apple Silicon boot and Recovery partitions.
diskutil apfs deleteVolume "Macintosh HD - Data"
Full Physical Disk GPT + APFS Wipe
Clean GPT DiskWipes an external drive or Intel internal disk0, writes a fresh GPT partition table, and initializes an empty APFS container.
diskutil eraseDisk APFS "Macintosh HD" /dev/disk0
Purge Hidden Time Machine Snapshots
Reclaim Ghost SpaceLocal APFS Time Machine snapshots often lock 40β100 GB of βSystem Dataβ. Lists and deletes local snapshots immediately.
tmutil listlocalsnapshots / && tmutil deletelocalsnapshots <snapshot_id>
5. Hardware & Daemon Triage: CoreAudio, Bluetooth & Gatekeeper
Common MacBook workstation glitches after undocking from Thunderbolt docks or external displays β such as dead audio output or frozen Bluetooth peripherals β can be resolved in under a second without rebooting.
Restart CoreAudio Daemon
No Sound FixRestores missing speakers, microphones, or HDMI/USB-C audio outputs instantly; launchd respawns the daemon automatically.
sudo killall coreaudiod
Hard-Reset Bluetooth Stack
Frozen Mouse / KeyboardTerminates bluetoothd, forcing the wireless controller to reinitialize and reconnect paired HID peripherals.
sudo pkill bluetoothd
Clear Gatekeeper Quarantine Flag
βApp Is Damagedβ FixStrips the extended com.apple.quarantine attribute from unsigned internal CLI tools or developer builds.
sudo xattr -r -d com.apple.quarantine /Applications/AppName.app
Reset TCC Privacy Permissions
Camera / Screen SharingClears corrupted Transparency, Consent, and Control (TCC) database entries when Teams, Zoom, or Chrome fails to prompt for camera/screen access.
tccutil reset All com.microsoft.teams
6. Apple Silicon M-Series, Rosetta 2 & Sleep Drain Triage
Managing mixed ARM64 and emulated x86_64 toolchains alongside Modern Sleep power assertions is essential on Apple Silicon developer machines.
Inspect Binary Architecture & x86 Shell
ARM64 vs. x86_64Verifies whether a binary is native Mach-O arm64 and spawns an x86_64 Zsh subshell under Rosetta translation.
file $(which node) && arch -x86_64 /bin/zsh
Silent Headless Rosetta 2 Install
CLI Translation EngineInstalls Appleβs Rosetta 2 binary translator without GUI prompts β mandatory in automated MDM onboarding scripts.
softwareupdate --install-rosetta --agree-to-license
Detect Processes Preventing Sleep
Power AssertionsIdentifies exact PIDs (Docker, Teams, background indexers) holding wake locks and draining battery inside a closed lid.
pmset -g assertions | grep -E "PreventUserIdleSystemSleep|NoDisplaySleepAssertion"
Flush DNS Cache (Sonoma & Sequoia)
mDNSResponderClears both directory service cache and multicast/unicast DNS resolver state in modern macOS releases.
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
Need the complete desk set?
The Apple macOS Admin & Recovery card is part of the SpecInfo Emergency Runbook A4 suite. Features zero-spillover print layout, 1-click copy QR codes, and Cyber Desk Mat dark theme.
Go to macOS A4 Card β