Published May 10, 2026

Cool tip from @mikeymikey

Add this to your shell profile to deal with the always confusing brew update vs brew upgrade behavior.

brew() {
    if [ "$1" = "update" ]; then
        shift
        command brew upgrade "$@"
    elif [ "$1" = "update-brew" ]; then
        shift
        command brew update "$@"
    elif [ "$1" = "upgrade-brew" ]; then
        shift
        command brew update "$@"
    else
        command brew "$@"
    fi
}

Back to Posts