From owner-freebsd-stable Sun Apr 19 22:23:15 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id WAA00722 for freebsd-stable-outgoing; Sun, 19 Apr 1998 22:23:15 -0700 (PDT) (envelope-from owner-freebsd-stable@FreeBSD.ORG) Received: from trinity.radio-do.de (trinity.Radio-do.de [193.101.164.3]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id FAA00649 for ; Mon, 20 Apr 1998 05:22:59 GMT (envelope-from fn@trinity.radio-do.de) Received: (from fn@localhost) by trinity.radio-do.de (8.8.8/8.8.5/RADIO-1.1) id HAA25486; Mon, 20 Apr 1998 07:22:45 +0200 (CEST) From: Frank Nobis Message-Id: <199804200522.HAA25486@trinity.radio-do.de> Subject: Re: How to detect obsolete files after a make world? In-Reply-To: from Ugo Paternostro at "Apr 19, 98 04:05:42 pm" To: paterno@dsi.UNIFI.IT (Ugo Paternostro) Date: Mon, 20 Apr 1998 07:22:44 +0200 (CEST) Cc: freebsd-stable@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL38 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk > [Well, this applies to -current too, but I post here as I run -stable] > > Is there a way to detect obsolete files/shared libs after a make world other > than manually scanning the directories looking for files that do not match the > make world date? > > Every time a so version number is bumped, you end with an old copy of the > library in /usr/lib, and every time a program is removed (like lfs some time > ago, or sgml tools a lot of time ago) you still retain that copy. > > Tell me it is possible without "newfs && make reinstall": that's the MircoSoft > way :-) > > What about a very dangerous use of "find / -type f \! -mtime 1 -delete", or > similar? ;-) This would for sure clear your /usr/local tree :-) Btw. there are shared libs under /usr/lib that are there from previous builds or from binaries linked against older shared libs, so they are neccessary. One could traverse the filesystem, take all the executables, do something like `find / -print |xargs ldd| sort -u` to get all the libraries in use and remove all others. Regards Frank To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message