Ask Ubuntu is a question and answer site for Ubuntu users and developers. 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 recently installed ghc 7.8, but now I want to go back to ghc 7.4

I installed ghc 7.8 via a binary package, but I didn't uninstall it correctly. When I run ghc, ghci or runhaskell, I get

/usr/local/bin/ghc: line 9: /usr/local/lib/ghc-7.8.2/bin/ghc: No such file or directory

How do I change all these applications to point to the correct version (7.4) that's here?

share|improve this question
up vote 0 down vote accepted

You can update the references using update-alternatives.

For example:

sudo update-alternatives --set ghc /usr/bin/ghc-7.4.1/ghc
sudo update-alternatives --set ghci /usr/bin/ghc-7.4.1/ghci
sudo update-alternatives --set runhaskell /usr/bin/ghc-7.4.1/runhaskell

More information.

share|improve this answer

Your Answer


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.