From owner-freebsd-questions@freebsd.org Mon Jan 4 18:18:06 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 B0FEEA62C2D for ; Mon, 4 Jan 2016 18:18:06 +0000 (UTC) (envelope-from markus@edemalm.se) Received: from server.edemalm.se (server.edemalm.se [IPv6:2001:470:28:47::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "server.edemalm.se", Issuer "Markus Edemalm TLS CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 42ABC1D4D for ; Mon, 4 Jan 2016 18:18:06 +0000 (UTC) (envelope-from markus@edemalm.se) Received: from host-10.edemalm.se (host-10.edemalm.se [IPv6:2001:470:28:47::10]) by server.edemalm.se with ESMTPSA id u04II2Nw020432 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 4 Jan 2016 19:18:02 +0100 (CET) (envelope-from markus@edemalm.se) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=edemalm.se; s=edemalm; t=1451931483; bh=HaZfnHNyD3QZCIFrw70a4ixlMRJ4B59rGBK/Ye2TCt0=; h=Subject:From:In-Reply-To:Date:Cc:References:To; b=f5zBTYKeuhq+ZZA027asxbHmjLDqE0YDJnA9Ohl2UhS2QHyRiuJ2vBNZfTvhO2H8I aklYmO2Q7rJKLOT8M4XFZxOAe/g5b8YFFN1/WtEsRKLCJzvkxkh+Mh9rSAXDqZygqO dVO5OfkWKDqdWNILRs/LrCXGqxOycnm6JOevO2vE= Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 9.1 \(3096.5\)) Subject: Re: Safe to delete old files in /usr/lib? From: Markus Edemalm In-Reply-To: <20160104185245.5ca2e4f1.freebsd@edvax.de> Date: Mon, 4 Jan 2016 19:18:02 +0100 Cc: freebsd-questions@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <20160104181211.76907a30.freebsd@edvax.de> <20160104185245.5ca2e4f1.freebsd@edvax.de> To: Polytropon X-Mailer: Apple Mail (2.3096.5) Received-SPF: Pass (sender authenticated); receiver=server.edemalm.se; client-ip=IPv6:2001:470:28:47::10; envelope-from= Received-SPF: Pass (sender authenticated); receiver=server.edemalm.se; client-ip=IPv6:2001:470:28:47::10; helo=host-10.edemalm.se 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 18:18:06 -0000 > 4 jan. 2016 kl. 18:52 skrev Polytropon : >=20 > On Mon, 4 Jan 2016 18:28:14 +0100, Markus Edemalm wrote: >>> 4 jan. 2016 kl. 18:12 skrev Polytropon : >>>=20 >>> On Mon, 4 Jan 2016 18:06:00 +0100, Markus Edemalm wrote: >>>> Hello, >>>>=20 >>>> 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=E2=80=99ve rebuild from source and followed the steps in the = handbook. Everything is fine=E2=80=A6 but: >>>>=20 >>>> I see many files in /usr/lib with old dates, apparently they are no = longer installed during upgrades. >>>>=20 >>>> My /etc/make.conf looks like this: >>>>=20 >>>> NO_PROFILE=3Dtrue >>>> WITHOUT_X11=3Dyes >>>>=20 >>>> Today, January the 4th, I upgraded to -p8. The newly installed = files has todays date, i.e =E2=80=9DJan 4=E2=80=9D. >>>> If I do: >>>>=20 >>>> ls -lF /usr/lib | grep -v 'Jan 4' | awk {'print $9'} >>>>=20 >>>> =E2=80=A6I get the following list of (obsolete?) files and folders = with older dates. >>>>=20 >>>> aout/ >>>> compat/ >>>> libBlocksRuntime.a >>>> libalias.a >>>> libalias_cuseeme.a >>=20 >> [long list cut] >>=20 >>>> liby.a >>>> libypclnt.a >>>> libz.a >>>> libzfs.a >>>> libzfs_core.a >>>> libzpool.a >>>>=20 >>>> Would it be safe to delete them? >>>=20 >>> If you install from source, use the following targets: >>>=20 >>> # 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. >>=20 >> Sorry, no files in /usr/lib comes up. Just a few others I know about. >>=20 >>> And then: >>>=20 >>> # 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. >>>=20 >>> 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). >>>=20 >>> 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. :-) >>=20 >> Thank you. Still wonder why they are so many and where the came from = in the first place. >=20 > 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). >=20 >=20 >=20 >> And, they are all .a files, except for libc++.so and libc.so. >>=20 >> I added NO_PROFILE=3Dtrue to /etc/make.conf a while back. Is that = relevant? >=20 > 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=20 WITHOUT_BLUETOOTH=3Dyes WITHOUT_FLOPPY=3Dyes WITHOUT_IPFW=3Dyes WITHOUT_IPFILTER=3Dyes That may explain why _some_ libs are not being built and installed. But still, more than 100 .a files with old dates. Doesn=E2=80=99t make = sense to me at all. /ME