# Install docker-squash with Homebrew

Docker image squashing tool. Version 1.2.2 via Homebrew; verified 2026-05-21.

## Install

```sh
sudo av install brew:docker-squash
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install docker-squash
```

  Evidence: local Homebrew formula metadata

## Package facts

- **Package key:** brew:docker-squash
- **Package manager:** Homebrew
- **Version:** 1.2.2
- **Source summary:** Docker image squashing tool
- **Homepage:** <https://github.com/goldmann/docker-squash>
- **Last updated:** 2026-05-21T10:31:32Z
- **Generated:** 2026-08-03T19:37:03+00:00

## Executables

- docker-squash (alias)

## Install behavior

- Bottle: not available

## Freshness

- Page generated: 2026-08-03
- Package-manager version: 1.2.2
## Project history and usage

docker-squash is a Python CLI for squashing Docker image layers. It grew out of a practical image-size problem: Dockerfile instructions create layers, temporary build artifacts can remain in earlier layers, and pushing, saving, or loading those images can cost unnecessary time and storage.

### Project history

The README describes docker-squash as a tool that can squash the last n layers of an image or squash from a selected layer to the end, then load the result back into the Docker daemon or store it as a tar archive. It explicitly frames squashing as a way to organize images into more logical layers and avoid carrying temporary files.

### Adoption history

The project was packaged for installation from source, PyPI, and Homebrew. Its relevance is strongest in the legacy Docker builder era, before BuildKit and multi-stage builds reduced the need for post-processing images to remove build-time artifacts.

### How it is used

A typical command selects an image, optionally sets --from-layer or a number of layers, tags the new image with --tag, writes an archive with --output-path, or controls whether the result is loaded back into Docker. The README examples compare docker history before and after squashing to show layer changes.

### Why package nerds care

docker-squash is notable because it packages image-layer surgery as a normal CLI command. It is a useful historical artifact for understanding how Docker users handled layer bloat before modern Dockerfile patterns and BuildKit made the problem less central.

### Timeline

- Docker 1.9 era: The README documents Docker 1.9 or newer support.
- Python 3 era: The README documents Python 3.6 and newer support.
- BuildKit era: Docker documents the legacy Linux image builder as deprecated, making squashing tools more historical and niche.

### Related projects

- Related projects include Docker Engine, Docker's legacy builder, BuildKit, multi-stage Dockerfiles, and the docker history command used to inspect image layers.

### Sources

- <https://github.com/goldmann/docker-squash#readme>
- <https://docs.docker.com/engine/deprecated/#legacy-builder-for-linux-images>


## Security Notes

No matching local secret-handling manifest was found for docker-squash. Nucleus package metadata is still published here so future coverage has a stable package URL.



## Combined YAML source

View the package source record on GitHub. [combined/docker-squash.yml](https://github.com/mxcl/pkgdb/blob/main/combined/docker-squash.yml)


## Sources

- pkg.so package database
- Geiger risk classifier
- curated package history
- pkgdb category and tag curation
- cross-ecosystem install command graph
