delete superfluous pathname