Getting rid of old version of ROOT

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.

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.)


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

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

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.

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?

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:

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/

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 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.)

Some old advices for ROOT 5 and configure (newer ROOT 6 uses cmake).

1 Like

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


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/


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.

cmake source/location -DCMAKE_INSTALL_PREFIX=/install/location
source /install/location/bin/

Is that clear?


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


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