Skip to content

[Bug]: Apple container taking too much space under ~/Library/Application Support/com.apple.container for snapshots #784

Closed

Description

@binuud

I have done the following

  • I have searched the existing issues
  • If possible, I've reproduced the issue using the 'main' branch of this project

Steps to reproduce

Diagnosis:

Folder Path: /Users/[redacted]/Library/Application Support/com.apple.container

How did I verify that this folder is used by apple containers ---
Looked at the log files and json files and snapshot-info file under the path, all indiicate that this folder is used by apple container.

com.apple.container/content/blobs/ - do not take much space, looks like these folders container the image layers. They take up space as required by the image. Problem is not seen here.

Issue:
/Users/......./Library/Application Support/com.apple.container/snapshots take copies of rootfs.ext4, instead of compressing the same. I did not take snapshots with CLI.

the snapshot-info file, does not speficy the path or name of the original folder, which is getting snapshotted.

rootfs.ext4 under /Users/......./Library/Application Support/com.apple.container/containers/8d9612b6-f655-4a18-8a3c-9de6dd0da6f2/rootfs.ext4, takes about 500 GB. My guess is the snapshots are of this folder.

Let me know if you would need any further information.

Image

Current behavior

apple containers snapshots and rootfs.ext4 files take up too much space, even for simple containers.
rootfs.ext4 file takes up too much space. And this file is getting snapshot'ed, and this is causing reduction of free space in hard disk.

Expected behavior

Snapshots should be compressed versions of config, and meta data. There is no need to have image information in the snapshot. I do not know how to peek at the rootfs.ext4 file to see what it contains.

Environment

- OS: macOS 26.0.1 (25A362)
- Xcode: Version 16.4 (16F6)
- Container: container CLI version 0.4.1 (build: release, commit: 4ac18b5)

Relevant log output

N/A

Code of Conduct

  • I agree to follow this project's Code of Conduct

Activity

  1. added theissue type on Oct 18, 2025
  2. mdempsky commented on Oct 20, 2025

    @mdempsky

    They're large files, but they're sparse, so the actual storage footprint is much smaller:

        ~/Library/Application Support/com.apple.container 
    ❯ ls -lh snapshots/*/snapshot
    -rw-r--r--  1 matthew  staff   512G Oct  1 21:37 snapshots/051fad4738beb294125a0375eee3b718fcbdafb5f021fb83fa39fbac8bf8f8cc/snapshot
    -rw-r--r--  1 matthew  staff   512G Oct  8 12:56 snapshots/3e347e3f7694d3a1db144f437bcd2674ad41726be54a3526538d476c7f0e1ce3/snapshot
    -rw-r--r--  1 matthew  staff   512G Jul 19 11:39 snapshots/4562b419adf48c5f3c763995d6014c123b3ce1d2e0ef2613b189779caa787192/snapshot
    -rw-r--r--  1 matthew  staff   512M Oct  3 14:22 snapshots/4dff0cbb8d64811a634ac7d02f0db4c706e53506dbf096098323cf610d90fd81/snapshot
    -rw-r--r--  1 matthew  staff   512G Oct  1 21:42 snapshots/546671046d6f9f786c24b83111ba1801b736ee4b01b23db33e4f3eb41d4f8883/snapshot
    -rw-r--r--  1 matthew  staff   512G Jul 19 12:04 snapshots/561d015542e18ccd6fb31b039a312334184f05f24b147f7562a7af79d16354e9/snapshot
    -rw-r--r--  1 matthew  staff   512M Oct  1 21:37 snapshots/59d4504c3c216c9fa61f9f75eb7f83de1e845fbb293700089390afc654e7bf51/snapshot
    -rw-r--r--  1 matthew  staff   512G Oct  3 14:22 snapshots/690d8c2d3af65501c70fc270cf886c6621f86e58fbe670c54bcc1f9cc2e8cb27/snapshot
    -rw-r--r--  1 matthew  staff   512G Jul 19 11:57 snapshots/69a73a9d84c4650fbf573553805d9c0088c823e14f248d00e4f1ef493c57e324/snapshot
    -rw-r--r--  1 matthew  staff   512G Oct  8 12:56 snapshots/6ce16ef3c8267b7aec46c0f41cb8f4a40295be847b237579324a2859c2f76b1e/snapshot
    -rw-r--r--  1 matthew  staff   512G Jul 19 12:12 snapshots/aac4d81b879331d00b45af12a5d071a50ce05c1b1c590970508cb94eb8510954/snapshot
    -rw-r--r--  1 matthew  staff   512G Oct 17 18:58 snapshots/bc10a3c3e639a748f4cdea1d6fa3d703079bcb02617fdf41ff2ce8709ef54ced/snapshot
    -rw-r--r--  1 matthew  staff   512G Jul 19 11:37 snapshots/d80747842415df3c210a25e5d20d09316f275428a47e45a1929a1662ec6cf551/snapshot
    -rw-r--r--  1 matthew  staff   512G Oct  8 12:57 snapshots/db67e61d72240c7d304e53a3454dafef60b2f214c8ddff445959d29777098e07/snapshot
    
        ~/Library/Application Support/com.apple.container 
    ❯ du -csh snapshots/*/snapshot
    253M	snapshots/051fad4738beb294125a0375eee3b718fcbdafb5f021fb83fa39fbac8bf8f8cc/snapshot
    366M	snapshots/3e347e3f7694d3a1db144f437bcd2674ad41726be54a3526538d476c7f0e1ce3/snapshot
     75M	snapshots/4562b419adf48c5f3c763995d6014c123b3ce1d2e0ef2613b189779caa787192/snapshot
    512M	snapshots/4dff0cbb8d64811a634ac7d02f0db4c706e53506dbf096098323cf610d90fd81/snapshot
    322M	snapshots/546671046d6f9f786c24b83111ba1801b736ee4b01b23db33e4f3eb41d4f8883/snapshot
    171M	snapshots/561d015542e18ccd6fb31b039a312334184f05f24b147f7562a7af79d16354e9/snapshot
    511M	snapshots/59d4504c3c216c9fa61f9f75eb7f83de1e845fbb293700089390afc654e7bf51/snapshot
    319M	snapshots/690d8c2d3af65501c70fc270cf886c6621f86e58fbe670c54bcc1f9cc2e8cb27/snapshot
    987M	snapshots/69a73a9d84c4650fbf573553805d9c0088c823e14f248d00e4f1ef493c57e324/snapshot
    980M	snapshots/6ce16ef3c8267b7aec46c0f41cb8f4a40295be847b237579324a2859c2f76b1e/snapshot
    270M	snapshots/aac4d81b879331d00b45af12a5d071a50ce05c1b1c590970508cb94eb8510954/snapshot
    299M	snapshots/bc10a3c3e639a748f4cdea1d6fa3d703079bcb02617fdf41ff2ce8709ef54ced/snapshot
    576M	snapshots/d80747842415df3c210a25e5d20d09316f275428a47e45a1929a1662ec6cf551/snapshot
    349M	snapshots/db67e61d72240c7d304e53a3454dafef60b2f214c8ddff445959d29777098e07/snapshot
    5.8G	total
    
  3. dcantah commented on Oct 20, 2025

    @dcantah
    Contributor

    @binuud As @mdempsky stated (thanks!), they're sparse files so take up much less actual space on disk than Finder leads on. If you believe there's still an issue please reopen!

  4. minusf commented on Jun 29, 2026

    @minusf
    1. They might be sparse files, but for Time Machine that doesn't seem to matter. Time machine now fails every time with "not enough diskspace" when I try to backup my home folder to an external drive.
    2. the snapshots seems to hang around even after there are no actual containers. Is there a way/tool to clean them up?
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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions