# How to update ansible when installed from source?

**URL:** <https://forum.ansible.com/t/how-to-update-ansible-when-installed-from-source/22471>\
**Category:** Ansible Project\
**Created:** [September 3, 2016, 5:57am UTC](https://forum.ansible.com/t/how-to-update-ansible-when-installed-from-source/22471 "2016-09-03T05:57:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Max\_Bigras](https://avatars.discourse-cdn.com/v4/letter/m/f07891/32.png) [@Max\_Bigras](https://forum.ansible.com/u/Max_Bigras)\
**Post date:** [September 3, 2016, 5:57am UTC](https://forum.ansible.com/t/how-to-update-ansible-when-installed-from-source/22471/1 "2016-09-03T05:57:10Z")

</div>

I set up `ansible` by cloning the [repo](https://github.com/ansible/ansible) down and then running `source ./hacking/env-setup` which, among other things, seems to add `/path/to/repos/ansible/bin` to my path, except it only works for my current session.

So then I used `sudo make install`. Now it seems like `ansible` is installed to `/usr/local/bin/ansible` and is currently version `2.2.0`

```auto
~ ❯ which ansible
/usr/local/bin/ansible
~ ❯ ansible --version                                   
ansible 2.2.0
  config file =
  configured module search path = Default w/o overrides

```

So what I’m wondering now is:

1. Was that the accepted way to have installed `ansible` from source?
2. How should I go about updating?

For number 2 I was thinking

```auto
$ git pull --rebase
$ git submodule update --init --recursive
$ sudo make install

```

But I’m not sure if that is the right way.

Thanks for your help 🙂

​
