Safe to delete old files in /usr/lib?

Polytropon freebsd at edvax.de
Tue Jan 5 11:00:44 UTC 2016


On Tue, 5 Jan 2016 14:17:30 +1030, Shane Ambler wrote:
> On 05/01/2016 06:04, Polytropon wrote:
> > On Mon, 4 Jan 2016 19:18:02 +0100, Markus Edemalm wrote:
> >>> 4 jan. 2016 kl. 18:52 skrev Polytropon <freebsd at edvax.de>:
> >>>
> >>> On Mon, 4 Jan 2016 18:28:14 +0100, Markus Edemalm wrote:
> >>>>> 4 jan. 2016 kl. 18:12 skrev Polytropon <freebsd at edvax.de>:
> >>>>>
> >>>>> On Mon, 4 Jan 2016 18:06:00 +0100, Markus Edemalm wrote:
> >>>>>> Hello,
> >>>>>>
> >>>>>> My system was first installed as 10.0-RELEASE. I have
> >>>>>> sinceupgraded 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.
> 
> Did you clear out /usr/obj
> With the right modifications dates, a binary doesn't need to be rebuilt

Maybe the installation process has copied files from /usr/obj
which have been left there from a previous build?



> .a files should be copied into the final binary, so removing .a files
> won't break anything that is already built, but the next make could
> fail with a missing library at link time.

Usually this should not happen. The build process happens "inside"
the generated /usr/obj subtree ("self-contained"), at least regarding
libraries to link against.



> I am running 10-stable and run make delete-old after upgrades -
> 
> ls /usr/lib/*.a | wc -l
> 292
> ls /usr/lib/*.so | wc -l
> 162
> 
> find /usr/lib -type l -name "*.a" | wc -l
> 22
> 
> I do seem to have a few old libs
> 
> find /usr/lib -not -newermt "2 weeks ago" | wc -l
> 19
> 
> Downloading base.txz for 10.2-RELEASE -
> 
> ls usr/lib/*.a | wc -l
> 287
> ls usr/lib/*.so | wc -l
> 162

So this is the relevant clue: Those files came from the initial
installation.


-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...


More information about the freebsd-questions mailing list