Step 1: Brew update
First, open up your terminal and type in the following command: "brew update". This will update the homebrew and it should always be run before installing or updating any package with brew.
$ brew update Updated 2 taps (homebrew/core and homebrew/cask). ==> New Formulae aptos bzip3 cdebug flagd grayskull kwctl openvino plz-cli prs [email protected] twm xinit xorg-server aws-sam-cli cascadia ecoji gokey kubent ocm pari-nflistdata podsync quartz-wm simdutf video-compare xmodmap xrdb ==> New Casks codux confectionery forkgram-telegram ideamaker mmhmm-studio oka-unarchiver runcat-plugins-manager superlist threads ==> Outdated Formulae ca-certificates icu4c ncurses node ruby xz ==> Outdated Casks altair-graphql-client You have 6 outdated formulae and 1 outdated cask installed. You can upgrade them with brew upgrade or list them with brew outdated.
Step 2: Brew upgrade
Next, type in the command "brew upgrade". This will upgrade all of your currently installed packages to the latest version.
$ brew upgrade
Upgrade individual package
If you only want to upgrade a specific package, you can type in the command "brew upgrade <package name>", replacing <package-name> with the name of the package you want to upgrade.
$ brew upgrade <package-name>
Once the update is complete, you can check that all packages are up-to-date by typing in the command "brew outdated". This will show you a list of any packages that are still not in the latest version.
And that's it! Your Homebrew installation is now fully updated and ready to go. If you have any issues or errors during the update process, you can check out the Homebrew documentation for further assistance.