homebrewapple-m1rosetta

How to uninstall Homebrew of Rosetta and install Homebrew native on Mac Bigsu (M1)


Previously I have installed Homebrew rosetta version on MacOs M1, now I see HomeBrew has native version, So how do I remove HomeBrew on rosetta and install the native version. Please help me with this problem, Thanks


Solution

  • Uninstall Rosetta version of Homebrew

    Run in rosetta mode inside terminal:

    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall.sh)"
    

    Then install natively inside the terminal (without rosetta):

    (with help of https://www.youtube.com/watch?v=nv2ylxro7rM)

    cd /opt
    sudo mkdir homebrew
    sudo chown -R $(whoami) /opt/homebrew
    curl -L https://github.com/Homebrew/brew/tarball/master | tar xz --strip 1 -C homebrew
    

    (Add the Homebrew bin directory to the PATH if you are using zsh)

    echo "export PATH=/opt/homebrew/bin:$PATH" >> ~/.zshrc