macOS Disk Scan & Repair

Repair Tool

Repair Tool verifies the active macOS system volume and physical disk, records disk/APFS information, attempts disk repairs with administrator access, and produces a timestamped log on the Desktop.

Platform
macOS
Privilege
sudo for repairs
Tools
diskutil + fsck
Output
Desktop log

Installation

Using the Melding Software Mac installer

Copy and paste this command into Terminal to install the Melding Software Mac scripts.

After reopening Terminal, type MeldingSoftware anytime to load the list.

curl -fsSL https://raw.githubusercontent.com/MeldingSoftware/Scripts/main/Mac/install.sh | bash

Because this command downloads and immediately runs a shell installer, you can review install.sh in the GitHub repository before executing it. Individual scripts may also request permissions, administrator access, Keychain authorization, Full Disk Access, or other macOS approvals depending on what the selected tool needs.

Documentation

Detection and inventory

Root volume

Detects the root device, volume name, file-system type, physical disk, and APFS container reference.

Disk inventory

Runs diskutil list.

SMART context

Reads best-effort SMART/protocol/media/device information for the physical disk when available.

APFS context

Lists APFS information and reads the detected container details when applicable.

Documentation

Verification

Volume verification

Runs diskutil verifyVolume / against the active system volume.

Whole-disk verification

Runs diskutil verifyDisk on the physical disk when one is resolved.

Post-repair verification

Repeats volume and disk verification after repair attempts.

Documentation

Repair behavior

Normal macOS

Attempts sudo diskutil repairVolume / and repairDisk, while explaining that repairs of an active mounted system volume can be limited.

macOS Recovery

When Recovery is detected, the script performs the diskutil repairs and also attempts fsck_apfs -y for APFS or fsck -fy for other file systems.

Recovery guidance

If normal-mode repairs cannot complete, the script gives Intel and Apple Silicon Recovery startup instructions.

Documentation

Report

Timestamped log

Writes Disk_Repair_Report_YYYY-MM-DD_HH-MM-SS.log to the Desktop.

Command output

Verification and repair output is echoed to the screen and appended to the log.

FAQ

Frequently asked questions

Does it work in normal macOS?

Yes, but repairs to the active system volume can be limited while it is mounted and in use.

Is Recovery better for repairs?

The script explicitly notes that repair is more likely to succeed from macOS Recovery.

Does it use fsck in normal mode?

The current fsck path is used in the Recovery branch.

Where is the log saved?

On the Desktop with a timestamped Disk_Repair_Report filename.

← Back to Mac Scripts