Skip to content

fix/disk-space-purgeable-decimal#80

Open
huexley wants to merge 1 commit intodan-snelson:3.0.0from
huexley:fix/disk-space-purgeable-decimal-1
Open

fix/disk-space-purgeable-decimal#80
huexley wants to merge 1 commit intodan-snelson:3.0.0from
huexley:fix/disk-space-purgeable-decimal-1

Conversation

@huexley
Copy link
Copy Markdown
Contributor

@huexley huexley commented Mar 28, 2026

Problem

diskutil info / reports incorrect free disk space on Macs with local
Time Machine snapshots or iCloud cache, because it ignores purgeable space.

Additionally, the binary divisor 1,073,741,824 (GiB) does not match
macOS/Finder display conventions which use 1,000,000,000 (GB decimal).

Example on affected Mac

  • diskutil info /36 GB free
  • Finder / macOS → 115 GB free
  • Delta: ~79 GB of purgeable Time Machine snapshots ignored

Fix

Replace diskutil info / with NSURLVolumeAvailableCapacityForImportantUsageKey
via JXA (JavaScript for Automation), which matches the Finder calculation exactly.
Switch divisor to 1,000,000,000 to align with macOS display conventions.

Tested on

  • macOS 26.3 (Apple Silicon)
  • 10 local Time Machine snapshots present

Fix disk space to include purgeable space and use decimal divisor
@dan-snelson dan-snelson changed the base branch from main to 3.0.0 March 28, 2026 09:45
@dan-snelson
Copy link
Copy Markdown
Owner

Thanks, @huexley!

(Mind submitting a PR to Mac Health Check ?)

@huexley
Copy link
Copy Markdown
Contributor Author

huexley commented Mar 28, 2026

You are welcome, this tool is a blessing !

@huexley
Copy link
Copy Markdown
Contributor Author

huexley commented Mar 28, 2026 via email

@dan-snelson
Copy link
Copy Markdown
Owner

If you're ill, I'll work on today; hope you feel better soon.

@huexley
Copy link
Copy Markdown
Contributor Author

huexley commented Mar 28, 2026 via email

@dan-snelson
Copy link
Copy Markdown
Owner

Sorry for any Dan-induced confusion … I've already started; you can focus on getting better.

@dan-snelson
Copy link
Copy Markdown
Owner

To https://github.com/dan-snelson/Mac-Health-Check.git
   b919883..12ae4f2  development -> development

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants