Skip to content

Instantly share code, notes, and snippets.

View zerda's full-sized avatar

SilverFox zerda

  • Shanghai, China
View GitHub Profile
@zerda
zerda / ami-clean.sh
Last active April 16, 2021 08:53 — forked from jdowning/ami-clean.sh
Script to clean up Ubuntu EC2 instance before packaging as an AMI
#!/bin/bash
# This script cleans up your EC2 instance before baking a new AMI.
# Run the following command in a root shell:
#
# wget -qO- https://gist.github.com/zerda/677b279f2b8888ed92c4c614790fe232/raw/ami-clean.sh | bash
function print_green {
echo -e "\e[32m${1}\e[0m"
}