From owner-freebsd-questions@freebsd.org Mon Jan 4 17:20:13 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 6CE8AA61500 for ; Mon, 4 Jan 2016 17:20:13 +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 192E61352 for ; Mon, 4 Jan 2016 17:20:12 +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 9F1433CDB8; Mon, 4 Jan 2016 18:12:11 +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 u04HCBXP003422; Mon, 4 Jan 2016 18:12:11 +0100 (CET) (envelope-from freebsd@edvax.de) Date: Mon, 4 Jan 2016 18:12:11 +0100 From: Polytropon To: Markus Edemalm Cc: freebsd-questions@freebsd.org Subject: Re: Safe to delete old files in /usr/lib? Message-Id: <20160104181211.76907a30.freebsd@edvax.de> In-Reply-To: References: 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:20:13 -0000 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 > libalias_dummy.a > libalias_ftp.a > libalias_irc.a > libalias_nbt.a > libalias_pptp.a > libalias_skinny.a > libalias_smedia.a > libarchive.a > libasn1.a > libauditd.a > libavl.a > libbegemot.a > libbsdxml.a > libbsm.a > libbsnmp.a > libbsnmptools.a > libbz2.a > libc++.a > libc++.so > libc.a > libc.so > libc_nonshared.a > libcalendar.a > libcam.a > libcom_err.a > libcompat.a > libcompiler_rt.a > libcrypt.a > libctf.a > libcxxrt.a > libdevinfo.a > libdevstat.a > libdialog.a > libdpv.a > libdtrace.a > libdwarf.a > libedit.a > libelf.a > libexecinfo.a > libfetch.a > libfigpar.a > libfl.a > libform.a > libformw.a > libgcc_eh.a > libgcov.a > libgeom.a > libgnuregex.a > libgomp.a > libgpib.a > libgssapi.a > libgssapi_krb5.a > libgssapi_ntlm.a > libgssapi_spnego.a > libhdb.a > libheimbase.a > libheimntlm.a > libheimsqlite.a > libhistory.a > libhx509.a > libipsec.a > libipx.a > libjail.a > libkadm5clnt.a > libkadm5srv.a > libkafs5.a > libkdc.a > libkiconv.a > libkrb5.a > libkvm.a > libl.a > libln.a > liblzma.a > libm.a > libmagic.a > libmd.a > libmemstat.a > libmenu.a > libmenuw.a > libmp.a > libmt.a > libncurses.a > libncursesw.a > libnetgraph.a > libngatm.a > libnvpair.a > libopie.a > libpam.a > libpanel.a > libpanelw.a > libpcap.a > libpmc.a > libproc.a > libprocstat.a > libradius.a > libreadline.a > libroken.a > librpcsec_gss.a > librpcsvc.a > librt.a > librtld_db.a > libsbuf.a > libsmb.a > libssl.a > libssp.a > libssp_nonshared.a > libstand.a > libstdbuf.a > libstdthreads.a > libtacplus.a > libthr.a > libthread_db.a > libufs.a > libugidfw.a > libulog.a > libumem.a > libusb.a > libusbhid.a > libutil.a > libuutil.a > libvgl.a > libvmmapi.a > libwind.a > libwrap.a > 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. 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. :-) -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...