Remove a locally cached Docker image.
docker rmi nginx:latest
Removes the image from local cache. Fails if any container (running or stopped) uses it - remove containers first or use -f. Caution note: check the target, scope, and preview or dry-run options before using this on a real system.
Safety: Inspect state before stopping, pruning, or changing running containers.