Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is it possible to and how do I get a list of all the packages installed on my Mac using Homebrew? I am not interested in packages installed outside of Homebrew.

share|improve this question
up vote 178 down vote accepted

brew list

Running brew list will show a list of all your installed Homebrew packages.

brew list

share|improve this answer
1  
If you had this list in a txt file. How would you go about installing all of them? brew install < list.txt doesn't seem to work. – Jonathan Nov 4 '14 at 14:19
5  
@Jonathan cat list.txt | xargs brew install Feel free to ask a separate question for more details or clarification. – grgarside Nov 4 '14 at 19:33
2  
@grgarside - love ur terminal prompt. would you be willing to share your config files for getting my prompt to look like that? – Kaushik Gopal Dec 9 '14 at 20:21
2  
@Kaushik I've finally written a blog post about my terminal/shell setup—feel free to ask any questions there. – grgarside Dec 14 '14 at 12:56
1  
@msanford Yep, I updated it for 2015, forgot about this link — thanks, I've 301'd it to the right place. – grgarside Nov 9 '15 at 16:57

brew leaves shows you all top-level packages. That is packages that are not dependencies. This should be the most interesting if you are using the list to re-install packages.

share|improve this answer
    
Nice answer. Do you know how to get a list of the packages that were installed by the user? This can be different to leaves. – Steven Shaw Jun 30 '15 at 3:02

You may use brew list | grep 'package-name' or if are looking for specific package.
brew list 'package-name' also works and provides additional information.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.