ClearCase Support: How to Delete a ClearCase Element
I am often asked how to remove an element (file or directory) from a ClearCase VOB. By removing an element, realize that all versions of the element will either become permanently erased or not easily accessible/viewable by default (more on that later).
Let's say you wanted to delete the file element /vob/test/a/b.txt.
First, you need to check out the parent directory. In this example, check out /vob/test/a manually.
Second, decide if you want to permanently delete all versions of the element or if you just want the file to not be accessible from the latest version of the parent directory from now on.
To permanently delete all versions of the element, run this command:
cleartool rmelem /vob/test/a/b.txt
ClearCase will ask you for confirmation, since this is a dangerous command. I recommend using this command to only free up disk space of elements that you will NEVER POSSIBLY need again. Use it at your own risk! You may need to be an administrator to do this command depending on permissions, and you may need to force this command to run using the "-force" argument. You can delete multiple elements at the same time by just appending more elements to the end of the line or by using wildcards.
On the other hand, I recommend to just delete the element from the latest directory listing by using this command:
cleartool rmname /vob/test/a/b.txt
Using this method, the file is still in the VOB, but the file is only accessible using older versions of the parent directory. This is great for cleaning up the VOB without permanently deleting anything. You can also delete multiple elements at the same time using this command too.
Finally with either command, you will need to check in the parent directory.
by Phil for Humanity