Skip to content

Folder com.apple.container has mismatched bytes when comparing size in Finder vs command lineΒ #119

Closed

Description

@roblabs

Issue with Finder reporting size on macOS 15

Folder com.apple.container has mismatched bytes when comparing size in Finder vs command line.

Steps to reproduce:

πŸ”΄ Finder

  • In Finder > View > as List (⌘ 2)
  • Enable Size by right clicking on any List column that you have

Issue: Finder shows the folder ~/Library/Application\ Support/com.apple.container with a size of 11 TB

πŸ”΄ Get Info

Get info computes 11,550.48 gigabytes

11,550,476,964,910 bytes (17.83 GB on disk) for 328 items


🟒 Terminal

cd ~/Library/Application\ Support/com.apple.container
# Summarize disk usage in the current directory
du -hs -- * | sort -h

du Result

Shows that ~/Library/Application\ Support/com.apple.container/snapshots is only 11 gigabytes; different from what Finder is reporting.

0B	user-plugins
4.0K	apiserver
4.0K	plugin-state
4.0K	state.json
8.0K	networks
14M	kernels
657M	containers
5.2G	content
11G	snapshots

System

uname -a
# Darwin something.local 24.5.0 Darwin Kernel Version 24.5.0: Tue Apr 22 19:48:46 PDT 2025; root:xnu-11417.121.6~2/RELEASE_ARM64_T8103 arm64
sw_vers
# ProductName:            macOS
# ProductVersion:         15.5
# BuildVersion:           24F74

Activity

  1. roblabs commented on Jun 10, 2025

    @roblabs
    Author

    I have no way to test on macOS 26 Beta. Could someone verify the issue on macOS 26 Beta to compare to my results?

    I am aware of the stated macOS 15 limitations:

    "There is no plan to address issues found with macOS 15 that cannot be reproduced in the macOS 26 Beta 1."

  2. dcantah commented on Jun 12, 2025

    @dcantah
    Contributor

    This is not an issue with container itself, but just with how finder vs du report size by default (and finder even gives a hint as to the actual size on disk in your output as well). The reason one of them shows as 11TB is because of how we chose to store container images. Every container image we download we place the contents of inside of a 500+GiB sparse file that we use as a block device and attach to the VM. On disk these are typically just the size of the contents of the image, but to some programs that might not check for the real size taken on disk and instead only the apparent size, the files can look quite large :). For example, below is the output with -A for du which informs the program to show you the apparent size, followed up by du's default behavior which displays the actual size taken on disk, which is much much more reasonable:

    ➜  du -h -A ~/Library/Application\Support/com.apple.container/snapshots/008448246686fe28544e36ba89e7bc7fbe6dad8a2ccdef576875c74298c46348/snapshot
    512G	/Users/dcantah/Library/Application Support/com.apple.container/snapshots/008448246686fe28544e36ba89e7bc7fbe6dad8a2ccdef576875c74298c46348/snapshot
    
    ➜  du -h ~/Library/Application\ Support/com.apple.container/snapshots/008448246686fe28544e36ba89e7bc7fbe6dad8a2ccdef576875c74298c46348/snapshot
     75M	/Users/dcantah/Library/Application Support/com.apple.container/snapshots/008448246686fe28544e36ba89e7bc7fbe6dad8a2ccdef576875c74298c46348/snapshot
    
  3. copumpkin commented on Jan 20, 2026

    @copumpkin

    @dcantah sorry to dig up an old thread here, but what's the "proper" way to clean up those sparse images? My ~/Application Support/com.apple.container/containers/buildkit/rootfs.ext4 is a 550GB sparse file, but it seems to have over 100GB of actual data in it too, and its contents are completely opaque to me. Is there a good way to manage that 100+GB of data inside the ext4 without downloading the buildkit thing from scratch every time?

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions