Home | News | Documentation | Download

How can I uninstall/remove/purge root on Ubuntu?

I thought this is the silliest thing to ask but after searching extensively, I could not find a satisfactory answer. There’s practically these two answers, the first one says to do this:

sudo apt-get purge root-system* root-plugin* libroot*

which I did but I don’t know how could it help in my case as I have not installed using apt-get but actually downloaded the compressed files and installed following this procedure. Then another question, where the answer doesn’t answer the question!

My guess is that maybe I can just go ahead and rm -rf the root directory and everything will be fine, but I am scared if something really bad happens and I can’t install root in the future again!

So I really need help. How can I uninstall root? The reason I want to remove root is that I installed it inside /home/me/ROOT/ and /home/ has very less space left and so I want to re-install root on another partition.


_ROOT Version: v6-10-04
_Platform: Ubuntu 18.04
_Compiler: g++ (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0, gcc (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0

What do you get from:

root-config --prefix
root-config --exec-prefix
root-config --bindir
root-config --libdir
root-config --incdir
root-config --etcdir
root-config --tutdir
root-config --srcdir

I get /home/me/ROOT/root/ and those various subdirectories, bin, include etc

So, you can simply rm -rf /home/me/ROOT/root

Great! Thanks. Let me do it… I will report to this thread if I face issues later (maybe after days/weeks).


after removing old /home/me/root/ directory, I was installing root on another partition using the command:

./configure linuxx8664gcc

after an hour or so, received this error:

/usr/bin/ld: cannot find -lXMLParser
collect2: error: ld returned 1 exit status
/mnt/uuid/blah/blah//root/hist/unfold/Module.mk:46: recipe for target 'lib/libUnfold.so' failed
make: *** [lib/libUnfold.so] Error 1

what is this error and what should I do? Remove root directory and start-over?

ROOT 6 uses the CMake.

I forgot to add, I followed these instructions, first configured using ./configure linuxx8664gcc and then I was asked to run make, so I did (make) and after an hour of progress it failed. I have removed the root directory and starting over.

You are using ROOT 5 instructions.

For ROOT 6, see: Building ROOT

@couet I’ve just realized the ROOT 6 instructions are broken: ROOT User’s Guide -> Appendix A: Install and Build ROOT

@Wile_E_Coyote thanks to have seen this. I will fix it. Not that the user’s guide is now is some frozen state. This information can be find in its updated form at the end of the ROOT github page:

or in the coming new version of the ROOT web site. Where the prototype can be seen here:

1 Like

I followed this one this time, obtained root from here, did the following:

cmake ../root/

then tried

cmake --build . -- -j8

but I have been asked to do ./configure first, so I did and then I did:

cmake --build . -- -j8

because I have 8 cores. It failed again, I am pasting below the last few lines…

g++  -pipe -m64 -std=c++11 -Wshadow -Wall -W -Woverloaded-virtual -fPIC -Iinclude   -pthread  -I/usr/include/freetype2 -I/usr/include/libpng16 -MMD -MP -I. -o graf2d/graf/src/G__Graf.o -c graf2d/graf/src/G__Graf.cxx
g++  -pipe -m64 -std=c++11 -Wshadow -Wall -W -Woverloaded-virtual -fPIC -Iinclude   -pthread  -MMD -MP -I. -o math/foam/src/G__Foam.o -c math/foam/src/G__Foam.cxx
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libgslcblas.a(xerbla.o): relocation R_X86_64_PC32 against symbol `stderr@@GLIBC_2.2.5' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status
/mnt/uuid/me/.../root/math/mathmore/Module.mk:98: recipe for target 'lib/libMathMore.so' failed
make: *** [lib/libMathMore.so] Error 1
make: *** Waiting for unfinished jobs....

Is this related to some libraries missing or something? Because I have installed all the pre-requisites, although the instructions are for Ubuntu 10 - 16 and mine is 18.04, but I remember last time it worked…I installed root on this same laptop 2 months ago and removed it using rm -rf /.../root/ as you suggested here. I have to install root asap though, please help.


This is a known problem. Use “-Dgsl_shared=ON” when configuring ROOT 6.

I am going to write down what finally worked for me for two reasons:

(1) I will follow these instructions next time I install ROOT somewhere else!
(2) You can point out mistakes/improvements.

..$ git clone http://github.com/root-project/root.git
..$ cd root
../root$ git checkout -b v6-10-04 v6-xx-xx

At this point I was making the mistake of cmake-ing inside the root source directory! This time I didn’t do that, I created a build-dir:

../root$ mkdir ../ROOT_BUILD/
../root$ cd ../ROOT_BUILD/
../ROOT_BUILD$ cmake ../root/
../ROOT_BUILD$ /cmake --build . -- -j8
../ROOT_BUILD$ source bin/thisroot.sh

and voila :innocent: done!

Note: I didn’t know where to use @Wile_E_Coyote’s suggestion of “ -Dgsl_shared=ON ”, because it was specific to “configure-ing” and I didn’t have to use “./configure [options]” this time at all!

Thank you so much for helping me out guyes.

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