dic removes local Docker images whose repository tags contain a string. It shows every match and asks for confirmation before deleting anything.
Important: Image removal is forced by default, matching the historical behavior of
dic. Use--no-forceto ask Docker to reject removals that require force.
brew install frankwiles/tools/dicPrebuilt binaries for Linux, macOS, and Windows are available on the GitHub Releases page.
Building from source requires Rust 1.85 or newer:
git clone https://github.com/frankwiles/dic.git
cd dic
cargo build --releaseThe binary will be written to target/release/dic.
Remove images with tags containing my-cool-app:
dic my-cool-appPreview a case-insensitive match without prompting or deleting:
dic --ignore-case --dry-run my-cool-appDelete without confirmation, while disabling Docker's forced-removal option:
dic --yes --no-force my-cool-appSelect every local image, including untagged images:
dic --all--all cannot be combined with a query and still requires confirmation unless --yes is supplied.
Usage: dic [OPTIONS] [QUERY]
Arguments:
[QUERY] String to match against image repository tags
Options:
--all Match every local image, including untagged images
-i, --ignore-case Match image tags without regard to ASCII case
--dry-run Show matches without prompting or deleting anything
-y, --yes Delete without asking for confirmation
--no-force Disable forced image removal (force is enabled by default)
-h, --help Print help
-V, --version Print version
Colors are disabled when output is redirected or the NO_COLOR environment variable is set.
Run the local quality checks with:
cargo fmt --all -- --check
cargo clippy --all-targets --all-features -- -D warnings
cargo test --all-targetsCI runs these checks on Linux and macOS. Dependabot and a scheduled RustSec audit monitor dependencies.
BSD-3-Clause. See LICENSE.
