# Getting rid of old version of ROOT

**URL:** <https://root-forum.cern.ch/t/getting-rid-of-old-version-of-root/24691>\
**Category:** ROOT\
**Created:** [May 8, 2017, 7:51pm UTC](https://root-forum.cern.ch/t/getting-rid-of-old-version-of-root/24691 "2017-05-08T19:51:54Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![christianwos](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/c/919ad9/32.png) [@christianwos](https://root-forum.cern.ch/u/christianwos)\
**Post date:** [May 8, 2017, 7:51pm UTC](https://root-forum.cern.ch/t/getting-rid-of-old-version-of-root/24691/1 "2017-05-08T19:51:54Z")

</div>

Hi all,

I just installed root-6.09.02 on my computer. Previously I had the version 5.34 which was a UBUNTU download package.

However, when I try to run root it still opens the old version. Can anybody tell me what I am doing wrong or how I can get rid of the old version?

Thank you very much.

---

<div class="post-metadata">

**Author:** ![Wile\_E\_Coyote](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/wile_e_coyote/32/12417_2.png) [@Wile\_E\_Coyote](https://root-forum.cern.ch/u/Wile_E_Coyote)\
**Post date:** [May 8, 2017, 7:54pm UTC](https://root-forum.cern.ch/t/getting-rid-of-old-version-of-root/24691/2 "2017-05-08T19:54:04Z")

</div>

sudo apt-get purge root-system\* root-plugin\* libroot\*  
(Note: afterwards check that the “/usr/lib/x86\_64-linux-gnu/root5.34” and the “/usr/lib/i386-linux-gnu/root5.34” subdirectories disappeared completely.)

---

<div class="post-metadata">

**Author:** ![christianwos](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/c/919ad9/32.png) [@christianwos](https://root-forum.cern.ch/u/christianwos)\
**Post date:** [May 8, 2017, 8:10pm UTC](https://root-forum.cern.ch/t/getting-rid-of-old-version-of-root/24691/3 "2017-05-08T20:10:15Z")

</div>

Thanks.

Actually, I had forgotten to do make install at the end and the new version wasn’t installed yet. However, now when I do make install I get the following error.

– Install configuration: “RelWithDebInfo”  
– Installing: /usr/local/etc/allDict.cxx.pch  
CMake Error at cmake\_install.cmake:36 (file):  
file INSTALL cannot copy file  
"/home/christianwos/root-build/etc/allDict.cxx.pch" to  
"/usr/local/etc/allDict.cxx.pch".

I checked in the etc/ folder and it is empty. I am ready to set my laptop on fire.

---

<div class="post-metadata">

**Author:** ![Wile\_E\_Coyote](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/wile_e_coyote/32/12417_2.png) [@Wile\_E\_Coyote](https://root-forum.cern.ch/u/Wile_E_Coyote)\
**Post date:** [May 8, 2017, 9:20pm UTC](https://root-forum.cern.ch/t/getting-rid-of-old-version-of-root/24691/4 "2017-05-08T21:20:10Z")

</div>

Get rid of any installed version (run “make uninstall” to get rid of what was installed now) and then try to configure and build your new ROOT completely from scratch again.

---

<div class="post-metadata">

**Author:** ![christianwos](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/c/919ad9/32.png) [@christianwos](https://root-forum.cern.ch/u/christianwos)\
**Post date:** [May 8, 2017, 9:31pm UTC](https://root-forum.cern.ch/t/getting-rid-of-old-version-of-root/24691/5 "2017-05-08T21:31:08Z")

</div>

Is this the only option you see? I mean, the new version was not even installed yet. I get the error when I run “make install”.

Isn’t there a way of getting that script into my etc/ folder?

---

<div class="post-metadata">

**Author:** ![ksmith](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/ksmith/32/12567_2.png) [@ksmith](https://root-forum.cern.ch/u/ksmith)\
**Post date:** [May 9, 2017, 2:50pm UTC](https://root-forum.cern.ch/t/getting-rid-of-old-version-of-root/24691/6 "2017-05-09T14:50:35Z")

</div>

If you plan on updating ROOT from source in the future I suggest you maintain the ROOT files separately from the system files. I have been doing this for many years and it ahs worked well for me:

```auto
cmake root-6.09.02 -DCMAKE_INSTALL_PREFIX=/opt/root/root-6.09.02
make -j 
make install
source /opt/root/root-6.09.02/bin/thisroot.sh

```

This allows a simply rm to get rid of that version of root without having to dig around and find all its files. You can also install multiple version to the `/opt/root` directory and simply source the `thisroot.sh` file corresponding the to the version you need.

(I’ve actually been using environment-modules to have multiple versions installed simultaneously, but that is another story.)

---

<div class="post-metadata">

**Author:** ![Wile\_E\_Coyote](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/wile_e_coyote/32/12417_2.png) [@Wile\_E\_Coyote](https://root-forum.cern.ch/u/Wile_E_Coyote)\
**Post date:** [May 9, 2017, 3:22pm UTC](https://root-forum.cern.ch/t/getting-rid-of-old-version-of-root/24691/7 "2017-05-09T15:22:56Z")

</div>

[Some old advices for ROOT 5 and configure (newer ROOT 6 uses cmake).](https://root-forum.cern.ch/t/missing-canvas/17664/17)

---

<div class="post-metadata">

**Author:** ![christianwos](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/c/919ad9/32.png) [@christianwos](https://root-forum.cern.ch/u/christianwos)\
**Post date:** [May 10, 2017, 3:06pm UTC](https://root-forum.cern.ch/t/getting-rid-of-old-version-of-root/24691/8 "2017-05-10T15:06:31Z")

</div>

Thank you for your reply. Another stupid question. my root folder, root-6.09.02 is under

/home/christianwos/

So, when I give the path in the prefix, do I do

cmake root-6.09.02 -DCMAKE\_INSTALL\_PREFIX=/home/christianwos/root-6.09.02

and then

. bin/thisroot.sh

?

---

<div class="post-metadata">

**Author:** ![ksmith](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/ksmith/32/12567_2.png) [@ksmith](https://root-forum.cern.ch/u/ksmith)\
**Post date:** [May 10, 2017, 3:10pm UTC](https://root-forum.cern.ch/t/getting-rid-of-old-version-of-root/24691/9 "2017-05-10T15:10:07Z")

</div>

Depends on if you want to keep the install and source files separate or not. Using he same folder in both locations will cause `make` to write out the binaries and libraries into the source folder.

```bash
cmake source/location -DCMAKE_INSTALL_PREFIX=/install/location
source /install/location/bin/thisroot.sh

```

Is that clear?

---

<div class="post-metadata">

**Author:** ![Axel](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/axel/32/11084_2.png) [@Axel](https://root-forum.cern.ch/u/Axel)\
**Post date:** [May 15, 2017, 9:12am UTC](https://root-forum.cern.ch/t/getting-rid-of-old-version-of-root/24691/10 "2017-05-15T09:12:00Z")

</div>

Hi,

We generally recommend against running `make install`. Just do cmake and make, and then use `. <build_dir>/bin/thisroot.sh` to set it up. Like that you can have multiple ROOT builds that don’t interfere.

Axel.

---

<div class="post-metadata">

**Author:** ![system](https://root-forum.cern.ch/uploads/default/original/3X/e/f/efe4f24398fd8ffeb76bccb6ecc46d9d9c003376.png) [@system](https://root-forum.cern.ch/u/system)\
**Post date:** [May 29, 2017, 9:18am UTC](https://root-forum.cern.ch/t/getting-rid-of-old-version-of-root/24691/11 "2017-05-29T09:18:18Z")

</div>

Closed on May 29, 2017, 9:18am UTC

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
