Created
June 29, 2016 23:05
-
-
Save kane-c/cfddee2d4dfb00f1694b10fd5265b7e3 to your computer and use it in GitHub Desktop.
Update and clean stuff for macOS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Usage: . ./macos-update.sh (so that upgrade_oh_my_zsh works) | |
echo 'Updating brew' | |
brew update | |
brew upgrade --all | |
brew cleanup | |
echo 'Updating shell' | |
upgrade_oh_my_zsh | |
echo 'Updating Docker and its images' | |
dinghy upgrade | |
eval $(dinghy env) | |
docker pull debian | |
docker pull debian:jessie | |
docker pull postgres | |
docker pull mailhog/mailhog | |
echo 'Cleaning Docker containers/images/volumes' | |
docker rm $(docker ps -aq) | |
docker images | grep none | awk '{print $3}' | xargs docker rmi | |
docker volume rm $(docker volume ls -qf dangling=true) | |
echo 'Cleaning .DS_Store (requires sudo)' | |
sudo find / -name '.DS_Store' -not -path '/Applications/.DS_Store' -not -path '/Volumes/*' -print -delete 2> /dev/null |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment