title: brew install postgresql (upgrade) error, could not link - dead links to old non-existent version
body: <blockquote>
    <p>Warning: Do not start deleting files manually in Terminal unless
    you've tried everything else first. Manual deletion may caused
    uninstall and install programs to crash.</p>
  </blockquote>
  
  <p>This is QA style post, sharing my path to resolve the issue. I'm sure there are better ways</p>
  
  <p>I picked up an older mac air and wanted to set it up for Ruby and Rails training. During the upgrade I had issues with installing postgresql:</p>
  
  <pre><code>➜  ~  brew install postgresql
  ....
  ==&gt; Installing postgresql
  ==&gt; Downloading https://downloads.sf.net/project/machomebrew/Bottles/postgresql-9.3.5.mountain_lion.bottle.tar.gz
  Already downloaded: /Library/Caches/Homebrew/postgresql-9.3.5.mountain_lion.bottle.tar.gz
  ==&gt; Pouring postgresql-9.3.5.mountain_lion.bottle.tar.gz
  ==&gt; Caveats
  ...
  To reload postgresql after an upgrade:
      launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
      launchctl load ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
  Error: An unexpected error occurred during the `brew link` step
  The formula built, but is not symlinked into /usr/local
  No such file or directory - /usr/local/Cellar/postgresql/9.2.3/include/server
  Error: No such file or directory - /usr/local/Cellar/postgresql/9.2.3/include/server
  </code></pre>
  
  <p>I'm installing postgresql 9.3.5, I couldn't care less about 9.2.3 not being found!</p>
  
  <pre><code>➜  ~  brew install postgresql
  Warning: postgresql-9.3.5 already installed, it's just not linked
  </code></pre>
  
  <p>but postgres was still broken.</p>
  
  <p>What's the problem?</p>