From owner-freebsd-questions@freebsd.org Mon Jan 4 19:34:22 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 44097A6174E for ; Mon, 4 Jan 2016 19:34:22 +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 D7CC218EA for ; Mon, 4 Jan 2016 19:34:21 +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 7CCE23CDCA; Mon, 4 Jan 2016 20:34:18 +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 u04JYIaQ003832; Mon, 4 Jan 2016 20:34:18 +0100 (CET) (envelope-from freebsd@edvax.de) Date: Mon, 4 Jan 2016 20:34:18 +0100 From: Polytropon To: Markus Edemalm Cc: freebsd-questions@freebsd.org Subject: Re: Safe to delete old files in /usr/lib? Message-Id: <20160104203418.aee8df91.freebsd@edvax.de> In-Reply-To: References: <20160104181211.76907a30.freebsd@edvax.de> <20160104185245.5ca2e4f1.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 19:34:22 -0000 On Mon, 4 Jan 2016 19:18:02 +0100, Markus Edemalm wrote: > > 4 jan. 2016 kl. 18:52 skrev Polytropon : > > > > 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. > > Hmm. I forgot about src.conf, I got: > > cat /etc/src.conf > WITHOUT_BLUETOOTH=yes > WITHOUT_FLOPPY=yes > WITHOUT_IPFW=yes > WITHOUT_IPFILTER=yes > > That may explain why _some_ libs are not being built and installed. > But still, more than 100 .a files with old dates. Doesn’t make sense to me at all. In this case, a good idea would be to move the old libraries out of /usr/lib (for example into a newly created /usr/lib.old directory) and checking if any application in use produces an error. In that case, the required library could be restored. If no further error appears - forget about those libraries. :-) -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...