So I did a bit of digging, and I found that the issue stemmed from my .zprofile file. With the new M1 macs, we are required to add a line of code to a file titled .zprofile when installing Homebrew by running the command below.
echo 'eval $(/opt/homebrew/bin/brew shellenv)' >> /Users/$USER/.zprofile
eval $(/opt/homebrew/bin/brew shellenv)
After looking in my .zprofile file, I noticed several lines of the following code: eval "$(/opt/homebrew/bin/brew)"
, which I believe is an older version that does not work with the new M1 macs. I must have typed that command in several times when it wasn't working because (again, after digging) I learned that the echo
command adds a new line to the .zprofile file every time it's run. (Src: comments from https://stackoverflow.com/questions/69422964/brew-command-line-mac-is-not-working-without-following-steps).
To solve the problem, I went into my .zprofile file in TextEdit and removed all of those extra lines of text. Now, when my terminal loads, it is clean!