How to uninstall a gcc Xcode add-on?

Discussion in 'Mac Programming' started by gerbe, Dec 5, 2011.

  1. gerbe macrumors newbie

    Sep 6, 2011
    Hi everyone, I'm a bit of a beginner so apologies for the basic questions.

    I'm using OS X Lion on a 2011 MacBook Air. I have also installed the latest version of Xcode.

    I've been trying to install a fortran compiler and was finally able to install gfotran 4.6.2 from the GCC Wiki.

    However, before this I previously tried to install "gcc-4.2 (Apple build 5666.3) with GNU Fortran 4.2.4 for Mac OS X 10.7" from the "R for Mac OS X" page. I installed that package (gcc-42-5666.3-darwin11.pkg) but nothing happened so I went ahead and installed the gfortran 4.6.2 package above.

    Now my question is: how do I uninstall the non-functioning gcc-4.2.5666.3 package that I erroneously installed? I can't figure out where it was installed to, and it doesn't seem to be doing anything. It doesn't even seem to have updated Xcode's version of gcc. When I run "gcc --version" I get:

    i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.1.00)
    This is the version that came with the latest Xcode.

    So how do I get rid of this non-functioning stuff that is now somewhere on my hard drive? For what it's worth, I did a time machine backup right before I installed it... but now I don't even know what folder I want to restore in order to get rid of it.

  2. itsmrjon macrumors regular

    Jun 11, 2011
    Two ways I can think of off the top of my head.

    1) use 'which gcc' to see where your current install is, go to that directory, rename it, type 'which gcc' again and see where the older versions are, then manually delete

    2) scan all of your sourced folders for gcc using grep, then manually execute each one with the --version suffix to see which version it is.. then delete any old versions

    both rather tedious... locations you should check:

Share This Page