annotate
apropos
catcr
catcs
cc.icon
cc.magic
cd
chactivity
chbl
checkin
checkout
checkvob
chevent
chflevel
chfolder
chmaster
chpool
chproject
chstream
chtype
chview
clearaudit
clearbug
cleardescribe
cleardiffbl
cleardiff
clearexport_ccase
clearexport_cvs
clearexport_pvcs
clearexport_rcs
clearexport_sccs
clearexport_ssafe
clearfsimport
cleargetlog
clearhistory
clearimport
clearjoinproj
clearlicense
clearmake
clearmake.options
clearmrgman
clearprojexp
clearprompt
cleartool
clearviewupdate
clearvobadmin
comments
config_ccase
config_spec
cptype
credmap
creds
deliver
describe
diffbl
diffcr
diff
dospace
edcs
endview
env_ccase
events_ccase
export_mvfs
exports_ccase
file
find
findmerge
fmt_ccase
getcache
get
getlog
help
hostinfo
init_ccase
ln
lock
lsactivity
lsbl
lscheckout
lsclients
lscomp
lsdo
lsfolder
lshistory
ls
lslock
lsmaster
lspool
lsprivate
lsproject
lsregion
lsreplica
lssite
lsstgloc
lsstream
lstype
lsview
lsvob
lsvtree
makefile_aix
makefile_ccase
makefile_gnu
makefile_pmake
makefile_smake
makefile_sun
man
merge
mkactivity
mkattr
mkattype
mkbl
mkbranch
mkbrtype
mkcomp
mkdir
mkelem
mkeltype
mkfolder
mkhlink
mkhltype
mklabel
mklbtype
mkpool
mkproject
mkregion
mkstgloc
mkstream
mktag
mktrigger
mktrtype
mkview
mkvob
mount_ccase
mount
msdostext_mode
mvfslog
mvfsstorage
mvfstime
mvfsversion
mv
omake
pathnames_ccase
permissions
profile_ccase
promote_server
protect
protectvob
pwd
pwv
query_language
quit
rebase
recoverview
reformatview
reformatvob
register
relocate
rename
reqmaster
reserve
rgy_backup
rgy_check
rgy_passwd
rgy_switchover
rmactivity
rmattr
rmbl
rmbranch
rmcomp
rmdo
rmelem
rmfolder
rmhlink
rmlabel
rmmerge
rmname
rmpool
rmproject
rmregion
rmstgloc
rmstream
rmtag
rmtrigger
rmtype
rmver
rmview
rmvob
schedule
schemes
scrubber
setactivity
setcache
setcs
setplevel
setsite
setview
shell
snapshot.conf
softbench_ccase
space
startview
type_manager
umount
uncheckout
unlock
unregister
unreserve
update
version_selector
view_scrubber
vob_restore
vob_scrubber
vob_sidwalk
vob_snapshot
vob_snapshot_setup
wildcards_ccase
winkin
xclearcase
xcleardiff
xmldiffmrg
DESCRIPTION
The rmelem command completely deletes one or more elements or symbolic links. In a snapshot view, rmelem also unloads the element from the view.
This command destroys information irretrievably. Use it thoughtfully to avoid compromising your organization's ability to support old releases. In many cases, it is better to use the rmname command.
For each element, rmelem does the following:
- Removes the entire version tree structure from the VOB database: element object, branch objects, and version objects.
- Removes all metadata (labels, attributes, hyperlinks, and triggers) attached to the element.
- Removes all event records for the element.
- (File elements) Removes the data containers that hold the element's file system data from its source storage pool.
- Removes all references to the element from versions of the VOB's directory elements. (As a result, subsequent listings and comparisons of those directory versions will be historically inaccurate.)
- Creates a destroy element event record in the element's VOB; this event record is displayed by lshistory vob:.
For each symbolic link, rmelem does the following:
- Removes the symbolic link and link object from the VOB.
- Removes all metadata (attributes and hyperlinks) attached to the symbolic link .
- Removes all event records for the symbolic link.
- Removes all references to the symbolic link from versions of the VOB's directory elements. (As a result, subsequent listings and comparisons of those directory versions will be historically inaccurate.)
Note: rmelem does not create an event record when you remove a symbolic link.
rmelem deletes only the instance of an element type object that is attached to the element. To delete the element type object or to delete the type object and all its instances, use the rmtype command.
Deleting a Directory Element
Deleting a directory element may cause some other elements (and symbolic links, if the VOB is replicated) to be orphaned; that is, it is no longer cataloged in any version of any directory. rmelem displays a message and moves an orphaned element or symbolic link to the VOB's lost+found directory:
cleartool: Warning: Object "foo.c" no longer referenced.
cleartool: Warning: Moving object to vob lost+found directory
as "foo.c.a0650992e2b911ccb4bc08006906af65".
Each derived object in the deleted directory is also moved to lost+found. (Only dynamic views have derived objects.) The derived object has no data, but you can use it in such commands as lsdo and catcr. View-private objects in the deleted directory are temporarily stranded, but can be transferred to the view's own lost+found directory, as follows:
Deleting Elements and Symbolic Links from the lost+found Directory
Use rmelem carefully when deleting elements or symbolic links from the lost+found directory. While the content of lost+found is typically unwanted elements and symbolic links, in some circumstances it can contain elements that are cataloged elsewhere in the VOB (that is, not orphaned). For this reason, we do not recommend executing rmelem recursively in lost+found.
If you need an element in lost+found, catalog it in a versioned directory using mv.
RESTRICTIONS
Identities
You must be the project owner, the project VOB owner, the symbolic link owner, or any of the following:
- root (UNIX)
- Member of the ClearCase administrators group (ClearCase on Windows)
- Local administrator of the ClearCase LT server host (ClearCase LT on Windows)
If the element you are trying to remove has no versions with attached metadata and you created all branches, you need only be the element owner.
OPTIONS AND ARGUMENTS
Confirmation Step
Event Records and Comments
- Default
- Creates one or more event records, with commenting
controlled by your .clearcase_profile file (default: –nc).
See the comments reference page. Comments
can be edited with chevent.
- –c·omment comment | –cfi·le comment-file-pname |–cq·uery | –cqe·ach | –nc·omment
- Overrides the default with the option you
specify.
EXAMPLES
The UNIX examples in this section are written for use in csh. If you use another shell, you may need to use different quoting and escaping conventions.
The Windows examples that include wildcards or quoting are written for use in cleartool interactive mode. If you use cleartool single-command mode, you may need to change the wildcards and quoting to make your command interpreter process the command appropriately.
In cleartool single-command mode, cmd-context represents the UNIX shell or Windows command interpreter prompt, followed by the cleartool command. In cleartool interactive mode, cmd-context represents the interactive cleartool prompt.
Note: In the UNIX examples that follow, arguments and output that show multicomponent VOB tags are not applicable to ClearCase LT, which recognizes only single-component VOB tags. In this manual, a multicomponent VOB tag is by convention a two-component VOB tag of the form /vobs/vob-tag-leaf—for example, /vobs/src. A single-component VOB tag consists of a leaf only—for example, /src. In all other respects, the examples are valid for ClearCase LT.
- Delete the file element rotate.c.
- Delete
the directory element release. Note that an orphaned
element, hello, is moved to the VOB's lost+found directory.
cmd-context rmelem release
Element "release" has 1 branches, 9 versions, and is entered
in 35 directory versions.
Remove element, all its branches and versions and modify all directory
versions containing element? [no] yes
cleartool: Warning: Object "hello" no longer referenced.
Object moved to vob lost+found directory as
"hello.5d400002090711cba06a080069061935".
Removed element "release". - Delete
the symbolic link text.c from the lost+found directory.
cmd-context rmelem \dev\lost+found\text.c
CAUTION! This will destroy the symbolic link, and will remove the
symbolic link from all directory versions that now contain it. Once you
destroy the symbolic link, it will be hard to restore it to its current
state. If you want to preserve the symbolic link, but remove references
to it from future directory versions, use the "rmname" command.
Symbolic link "text.c" is entered in 3 directory versions.
Destroy symbolic link? yes
Removed symbolic link "text.c".