Here is a 1997 email to the CCIUG email group that talks about the wrong way to clean up the lost+found directory.

From: "Douglas B. Robinson"
Subject: Re: [cciug] Clean up lost+found
Sender: owner-cciug@atria.com
Date: Thu, 29 May 1997 18:02:15 GMT

Steve:

At 09:42 AM 5/29/97 -0400, Steve wrote:
>You can do a bottom-up element removal, for example
>%cleartool find * -depth -exec 'cleartool rmelem $CLEARCASE_PN'
>
>That way, if you have directory elements in lost+found, you
>remove the directory contents before you remove the directory.

This is unfortunately the *WRONG* way to go about cleaning
up the ClearCase lost+found directory unless you are
*ABSOLUTELY* *CERTAIN* that the elements in directories
that have migrated to lost+found were *NEVER* linked into
directory(ies) that did *NOT* migrate into lost+found.

The following sequence may enlighten the audience:

	cd /vob/foo
	co -nc .
	ct mkdir -nc foo
	ct mkdir -nc foo/foo2
	cd foo/foo2
	ct mkelem Makefile
	ci -nc Makefile
	cd ..
	ci -nc foo2
	cd ..
	ci -nc .				[ let's say that this created version 55 ]
	co -nc .
	ct mkdir bar
	ct rmname foo
	ct ln .@@/foo/foo2/Makefile bar
	ci -nc bar .
	ct rmelem -nc .@@/55/foo	[ this will cause foo2 to migrate into lost+found ]

At this point, if you were to do a depth first rmelem
of the contents of lost+found you'd be very sad since
you would lose the Makefile which you had intentionally
linked into /vob/foo/bar/Makefile .

The proper procedure, after having eliminated all of the
checkouts from lost+found (either by tracking down the users
or by a judicious use of "cleartool rmview -uuid"), is to:

	cd lost+found
	cleartool rmelem -force ./*

and cycle on the "rmelem" until there is nothing left in
lost+found.  If a directory is removed that holds contents
and those contents are not linked anywhere else they will
migrate into lost+found as the directory is rmelem'd (and
hence the need to keep doing the rmelem until the lost+found
directory is clear).

Sincerely:

Doug