Delete TGraph object with underscore in its name?

Please read tips for efficient and successful posting and posting code

ROOT Version: Not Provided
Platform: conda environment on ubuntu 16.04
Compiler: Not Provided

Hi rooters,

Here’s a simple question but I can’t get it to work. How do I delete a tgraph in root? What I read in root user guide is something like:


assuming f1 is my current directory/rootfile. However I used the command and .ls again the object is still in the root file. I suspect the problem is that the object’s name has underscore in it but I could be wrong.


Make sure you have write permission to the root file, and open it with the “UPDATE” option.

Thanks! Wow, indeed I forgot to open it in “UPDATE” mode. A newbie mistake

The command-line tool rootrm can also be used.

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