To check packages that could be updated through brew, use the following command:
brew update
This command fetches the latest version of Homebrew and its formulae (the package descriptions) from GitHub.
To upgrade all packages, use the following command:
brew upgrade
To see all the packages installed on brew, use the following command:
brew list
If you want to see the versions of packages, use the following command:
brew list --version