Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 was using wget in Ubuntu from /usr/bin/wget (i.e. that's what appeared when I ran which wget.) Now, I just downloaded wget from, and installed it using ./configure; make; sudo make install.

Now when I ran which wget, the output is /usr/local/bin/wget. What should I do if I want to change it back to the old one?

share|improve this question
Which one it gets is determined by which one it finds first, which is determined by the PATH environment variable. – Keith Nov 19 '12 at 5:07
up vote 1 down vote accepted

Depending on if you want to keep the new version or not, what you want to do is as simple as either deleting or renaming the new version

rm /usr/local/bin/wget
mv /usr/local/bin/wget /usr/local/bin/wget_new

The new version got replaced because of the way the terminal determines which version to use. There is an environment variable called PATH. You can see its value with echo $PATH. Basically its a list of paths(folders), and when you try to run wget, it will run through that list and try to find the first one that has a exe by that name, and thats the one that gets run.

In your case I'm guessing PATH is something like ...:/usr/local/bin/:...:/usr/bin. Because of this, your new version is effectively hiding the old version of wget

share|improve this answer
So, say I delete the new version, will the system automatically switch back to using the one at /usr/bin/wget? How does it determine which one it uses? – Mika H. Nov 19 '12 at 5:03
Yup it will revert to that version – Karthik T Nov 19 '12 at 5:06
Got it. Thanks for the very clear explanation! – Mika H. Nov 19 '12 at 5:19

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.