{"id":34097,"date":"2021-11-05T22:15:15","date_gmt":"2021-11-06T02:15:15","guid":{"rendered":"https:\/\/mjtsai.com\/blog\/?p=34097"},"modified":"2021-11-05T22:15:15","modified_gmt":"2021-11-06T02:15:15","slug":"diskspace-tool-to-report-apfs-free-space","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2021\/11\/05\/diskspace-tool-to-report-apfs-free-space\/","title":{"rendered":"diskspace Tool to Report APFS Free Space"},"content":{"rendered":"<p><a href=\"https:\/\/scriptingosx.com\/2021\/11\/monterey-python-and-free-disk-space\/\">Armin Briegel<\/a>:<\/p>\n<blockquote cite=\"https:\/\/scriptingosx.com\/2021\/11\/monterey-python-and-free-disk-space\/\">\n<p>With the recent versions of macOS, getting a value of the available disk space is not as strightforward as it used to be. There are a lot of files and data on the system, which will be cleared out when some process requires more disk space. Most of this is cache data or data that can be restored from cloud storage. But this &lsquo;flexible&rsquo; available disk space will not be reported by the traditional tools, such as df or diskutil. The available disk space these tools report will be woefully low.<\/p>\n<p>The available disk space which Finder reports will usually be much higher. There is functionality in the macOS system frameworks where apps can get the values for available that takes the &lsquo;flexible&rsquo; files into account.<\/p>\n<p>[&#8230;]<\/p>\n<p>I built a command line tool that reports the different levels of &lsquo;available&rsquo; disk space. When you run <code>diskspace<\/code> it will list them all. There are raw and &lsquo;human-readable&rsquo; formats.<\/p>\n<\/blockquote>\n\n<p>It&rsquo;s open source and available <a href=\"https:\/\/github.com\/scriptingosx\/diskspace\">here<\/a>.<\/p>\n\n<p>Previously:<\/p>\n<ul>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2021\/05\/16\/big-sur-really-needs-real-free-space\/\">Big Sur Really Needs Real Free Space<\/a><\/li>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2021\/02\/08\/check-free-space-before-updating-to-big-sur\/\">Check Free Space Before Updating to Big Sur<\/a><\/li>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2020\/02\/26\/what-you-see-in-the-finder-should-always-be-correct\/\">What You See in the Finder Should Always Be Correct<\/a><\/li>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2019\/04\/11\/quantum-computing-and-apfs-free-and-used-space\/\">Quantum Computing and APFS: Free and Used Space<\/a><\/li>\n<\/ul>","protected":false},"excerpt":{"rendered":"<p>Armin Briegel: With the recent versions of macOS, getting a value of the available disk space is not as strightforward as it used to be. There are a lot of files and data on the system, which will be cleared out when some process requires more disk space. Most of this is cache data or [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"apple_news_api_created_at":"2021-11-06T02:15:18Z","apple_news_api_id":"72fd9215-4411-495e-9e26-d6b83e14a8f7","apple_news_api_modified_at":"2021-11-06T02:15:19Z","apple_news_api_revision":"AAAAAAAAAAD\/\/\/\/\/\/\/\/\/\/w==","apple_news_api_share_url":"https:\/\/apple.news\/Acv2SFUQRSV6eJta4PhSo9w","apple_news_coverimage":0,"apple_news_coverimage_caption":"","apple_news_is_hidden":false,"apple_news_is_paid":false,"apple_news_is_preview":false,"apple_news_is_sponsored":false,"apple_news_maturity_rating":"","apple_news_metadata":"\"\"","apple_news_pullquote":"","apple_news_pullquote_position":"","apple_news_slug":"","apple_news_sections":"\"\"","apple_news_suppress_video_url":false,"apple_news_use_image_component":false,"footnotes":""},"categories":[2],"tags":[1395,30,2077,74,174,901],"class_list":["post-34097","post","type-post","status-publish","format-standard","hentry","category-technology","tag-apple-file-system-apfs","tag-mac","tag-macos-12","tag-opensource","tag-storage","tag-swift-programming-language"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/34097","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/comments?post=34097"}],"version-history":[{"count":1,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/34097\/revisions"}],"predecessor-version":[{"id":34098,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/34097\/revisions\/34098"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=34097"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=34097"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=34097"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}