'How to list Homebrew packages?

I am new to using the terminal on Mac Catalina.

When I enter brew help, it appears that brew is installed.

However, when I attempt to list the packages in the terminal with the command brew search. I keep getting this error:

Invalid usage: This command requires at least 1 text or regex argument.

How do I fix this?



Solution 1:[1]

If you want to list all available formulae run:

brew formulae

If you want to list installed formulae run:

brew list

If you want to search all available formulae containing, for example, the string "mariadb" run:

brew search mariadb

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1