#!/bin/bash
# Docker Desktop Complete Removal Guide
# Run this script for instructions on fully removing Docker Desktop

echo "╔════════════════════════════════════════════════════════════════╗"
echo "║  Docker Desktop Removal Guide                                  ║"
echo "╚════════════════════════════════════════════════════════════════╝"
echo ""
echo "Docker Desktop data is protected by macOS System Integrity Protection."
echo "You need to remove it using one of these methods:"
echo ""
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo "METHOD 1: Using Docker Desktop App (Recommended)"
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo ""
echo "1. Open Docker Desktop app"
echo "2. Click the gear icon (Settings)"
echo "3. Go to 'Troubleshoot'"
echo "4. Click 'Uninstall'"
echo "5. Follow the prompts"
echo ""
echo "This will properly remove:"
echo "  - Docker Desktop application"
echo "  - All Docker data (~52 GB)"
echo "  - Docker CLI tools"
echo ""
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo "METHOD 2: Manual Removal with Elevated Permissions"
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo ""
echo "If Docker Desktop app is missing/corrupted, run these commands:"
echo ""
echo "# Remove Docker data (requires password)"
echo "sudo rm -rf ~/Library/Containers/com.docker.docker"
echo "sudo rm -rf ~/Library/Application\\ Support/Docker\\ Desktop"
echo "sudo rm -rf ~/.docker"
echo ""
echo "# Remove Docker app"
echo "sudo rm -rf /Applications/Docker.app"
echo ""
echo "# Remove Docker CLI"
echo "sudo rm -f /usr/local/bin/docker"
echo "sudo rm -f /usr/local/bin/docker-compose"
echo "sudo rm -f /usr/local/bin/docker-credential-desktop"
echo ""
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo "After Removal"
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo ""
echo "✅ You'll recover: ~52 GB"
echo "✅ Your development workflow remains unchanged"
echo "✅ All containers run on remote server (192.168.1.228)"
echo ""
echo "Your workflow:"
echo "  Edit code → Deploy to remote → Test on remote → Commit"
echo ""
