mirror of
https://github.com/kossakovsky/n8n-install.git
synced 2026-03-07 22:33:11 +00:00
- Introduced a new script, docker_cleanup.sh, for cleaning up unused Docker containers, images, and volumes to free up disk space. - Updated README.md to include instructions for using the Docker cleanup script, emphasizing its utility and caution regarding data removal.
24 lines
679 B
Bash
Executable File
24 lines
679 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# This script is intended for cleaning up the Docker system.
|
|
# It removes all unused containers, images, networks, and volumes.
|
|
# Use with caution, as this action is irreversible.
|
|
|
|
echo "Starting Docker cleanup..."
|
|
|
|
# The 'docker system prune' command removes:
|
|
# - all stopped containers
|
|
# - all networks not used by at least one container
|
|
# - all "dangling" (unreferenced) images
|
|
# - all build cache
|
|
#
|
|
# Additional flags:
|
|
# -a, --all: Remove all unused images, not just dangling ones.
|
|
# --volumes: Remove all unused volumes.
|
|
# -f, --force: Do not prompt for confirmation.
|
|
|
|
docker system prune -a --volumes -f
|
|
|
|
echo "Docker cleanup completed successfully."
|
|
|