Skip to content

Instantly share code, notes, and snippets.

Avatar

Mike Dixson mikedixson

View GitHub Profile
@mikedixson
mikedixson / ubuntu-ami-clean.sh
Last active Jul 27, 2022 — forked from garlandkr/ami-clean.sh
Clean-up an Amazon EC2 instance before creating an AMI
View ubuntu-ami-clean.sh
#!/bin/bash
# Run this script with:
# bash <(curl -s https://gist.githubusercontent.com/mikedixson/ab4365d7ff43c5fcbdaef9e4a5a186ac/raw/df8d4e298a0f1d9b34b134797f9993896db36970/ubuntu-ami-clean.sh)
function print_green {
echo -e "\e[32m${1}\e[0m"
}
print_green 'Clean apt'