From owner-freebsd-questions@freebsd.org Mon Jan 4 17:52:48 2016 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AFCFBA6224D for ; Mon, 4 Jan 2016 17:52:48 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mx01.qsc.de (mx01.qsc.de [213.148.129.14]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 512161CB1 for ; Mon, 4 Jan 2016 17:52:47 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from r56.edvax.de (port-92-195-21-51.dynamic.qsc.de [92.195.21.51]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx01.qsc.de (Postfix) with ESMTPS id 3EBB93CD36; Mon, 4 Jan 2016 18:52:46 +0100 (CET) Received: from r56.edvax.de (localhost [127.0.0.1]) by r56.edvax.de (8.14.5/8.14.5) with SMTP id u04Hqjl2003535; Mon, 4 Jan 2016 18:52:45 +0100 (CET) (envelope-from freebsd@edvax.de) Date: Mon, 4 Jan 2016 18:52:45 +0100 From: Polytropon To: Markus Edemalm Cc: freebsd-questions@freebsd.org Subject: Re: Safe to delete old files in /usr/lib? Message-Id: <20160104185245.5ca2e4f1.freebsd@edvax.de> In-Reply-To: References: <20160104181211.76907a30.freebsd@edvax.de> Reply-To: Polytropon Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jan 2016 17:52:48 -0000 On Mon, 4 Jan 2016 18:28:14 +0100, Markus Edemalm wrote: > > 4 jan. 2016 kl. 18:12 skrev Polytropon : > > > > On Mon, 4 Jan 2016 18:06:00 +0100, Markus Edemalm wrote: > >> Hello, > >> > >> My system was first installed as 10.0-RELEASE. I have since upgraded to 10.1, 10.1-STABLE, 10.2-RELEASE and is now at 10.2-RELEASE-p8. > >> I’ve rebuild from source and followed the steps in the handbook. Everything is fine… but: > >> > >> I see many files in /usr/lib with old dates, apparently they are no longer installed during upgrades. > >> > >> My /etc/make.conf looks like this: > >> > >> NO_PROFILE=true > >> WITHOUT_X11=yes > >> > >> Today, January the 4th, I upgraded to -p8. The newly installed files has todays date, i.e ”Jan 4”. > >> If I do: > >> > >> ls -lF /usr/lib | grep -v 'Jan 4' | awk {'print $9'} > >> > >> …I get the following list of (obsolete?) files and folders with older dates. > >> > >> aout/ > >> compat/ > >> libBlocksRuntime.a > >> libalias.a > >> libalias_cuseeme.a > > [long list cut] > > >> liby.a > >> libypclnt.a > >> libz.a > >> libzfs.a > >> libzfs_core.a > >> libzpool.a > >> > >> Would it be safe to delete them? > > > > If you install from source, use the following targets: > > > > # check-old - List obsolete directories/files/libraries. > > # check-old-dirs - List obsolete directories. > > # check-old-files - List obsolete files. > > # check-old-libs - List obsolete libraries. > > Sorry, no files in /usr/lib comes up. Just a few others I know about. > > > And then: > > > > # delete-old - Delete obsolete directories/files/libraries. > > # delete-old-dirs - Delete obsolete directories. > > # delete-old-files - Delete obsolete files. > > # delete-old-libs - Delete obsolete libraries. > > > > See the comment header of /usr/src/Makefile for more information > > (and how those targets fit the recommended updating procedure, > > listed a few lines later). > > > > Generally speaking: As long as no program is linked against those > > files, and no program requires them, they can be deleted. This > > statement highly depends on which programs you have installed > > and what they are linked against. :-) > > Thank you. Still wonder why they are so many and where the came from in the first place. They have been installed by the OS (from the initial installation media or subsequent update processes), as the /usr/lib directory is reserved for OS files (like /usr/local/lib is for 3rd party libraries). > And, they are all .a files, except for libc++.so and libc.so. > > I added NO_PROFILE=true to /etc/make.conf a while back. Is that relevant? Hmmm... I always thought that would be the default (no profiling libs being built and installed). But according to "man src.conf", the setting's name is WITHOUT_PROFILE, not NO_PROFILE. -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...