Super User is a question and answer site for computer enthusiasts and power users. 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

I've had some issues with my terminal being extremely slow while starting up (both new windows and new tabs), from 10 seconds and up. I've tried deleting the Apple System Logs, but it doesn't help.

Today I hit Ctrl+C while it was starting and the following was output:

/usr/local/Library/Homebrew/global.rb:65:in ``': Interrupt
from /usr/local/Library/Homebrew/global.rb:65
from /usr/local/bin/brew:10:in `require'
from /usr/local/bin/brew:10

This obviously makes me think homebrew is doing something fishy that makes things slow down. I get the same message whenever I hit Ctrl+C during startup, whether it's after 1 second or 14, so I'm assuming it's the same process that's running for the whole time.

My google searches on this issue came up empty, so I'm throwing it out there and hoping for the best.

Does anyone know how to remedy this?

share|improve this question
The great question would be why homebrew gets started with terminal in first place. – bdecaf Sep 18 '12 at 11:59
Start Terminal, enter cd;open .profile you will get (hopefully) the, add set -x to the top of the file. Save and open an new Terminal window - you will get what is bash doing at the startup... – kobame Sep 18 '12 at 12:06
I've added "set -x" to my .profile, but I can't see anything different when I'm starting my terminal. – Oskar Eriksson Sep 18 '12 at 21:02
up vote 1 down vote accepted

Finally figured it out. My .bash_profile had about 100 lines like this one:

source "`brew --prefix grc`/etc/grc.bashrc"

I removed all but one and it's fast and snappy again.

share|improve this answer

Make sure you do not have this line in you bash profile

echo 'source "`brew --prefix grc`/etc/grc.bashrc"' >> ~/.bash_profile

It adds that line every time you open a terminal window.

share|improve this answer
Welcome to Super User! Your post needs to be expanded. A good answer includes specific instructions (not just links to them) and an explanation as to how or why the answer addresses the OPs question. Please edit your post to adequately address both of these elements. – Twisty Jun 5 '15 at 19:04

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .