Initial commit: homelab maintenance and automation scripts
This commit is contained in:
Executable
+19
@@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
# Docker system cleanup — prune unused images, containers, volumes, networks
|
||||
set -euo pipefail
|
||||
|
||||
echo "=== Docker Cleanup — $(date) ==="
|
||||
echo ""
|
||||
|
||||
echo "Disk usage before cleanup:"
|
||||
docker system df 2>/dev/null || echo "(Docker not accessible)"
|
||||
echo ""
|
||||
|
||||
echo "Pruning unused data..."
|
||||
docker system prune -f --volumes 2>/dev/null || echo "⚠️ Prune failed — is Docker running?"
|
||||
echo ""
|
||||
|
||||
echo "Disk usage after cleanup:"
|
||||
docker system df 2>/dev/null || echo "(Docker not accessible)"
|
||||
echo ""
|
||||
echo "✅ Cleanup complete"
|
||||
Reference in New Issue
Block a user