Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 4 Jan 2016 18:12:11 +0100
From:      Polytropon <freebsd@edvax.de>
To:        Markus Edemalm <markus@edemalm.se>
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: <D6FAF4F3-EE48-4411-909D-9D13D8B9B620@edemalm.se>
References:  <D6FAF4F3-EE48-4411-909D-9D13D8B9B620@edemalm.se>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
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, ...



Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?20160104181211.76907a30.freebsd>