On your next DragonFly upgrade, watch the end of your ‘make upgrade’ output. You may have some deprecated files, especially if your system has been upgraded through several releases.
= You have 11 now deprecated files.
= Once you are sure that none of your third party (ports or local)
= software are still using them, rerun with REMOVE_DEPRECATED set.
The now-deprecated files will be listed just before this warning. They aren’t removed automatically in case there’s installed software still linking to them. If you are running only dports software, and are up to date with all of it, you are probably fine to remove these files:
make -DREMOVE_DEPRECATED upgrade
If you have software you compiled yourself some time ago, it may have linked to these old files. One way to search for that would be to use find to find all executable files that are in particular directories, and then use ldd to see what shared libraries are used by each executable:
find /usr/local/bin /usr/local/sbin -type f -perm +a+x -print -exec ldd {} \;
… and then grep for the names of the deprecated files. You’ll get a bunch of “not a dynamic executable” errors when you do this because it’s a rough example I did for this post, but you can always pipe the stdout of the command to a file and review later. If you do turn up any executables linked to the deprecated files – recompile!
(If you have a better find string or strategy, please comment.)
pkg-cruft can find such executables linking to old packaged libraries, should be fairly simple to add support for obsolete base libraries – just need a machine-readable list of them.
https://github.com/Freaky/pkg-cruft
/u/src> sudo make -MREMOVE_DEPRECATED upgrade
usage: make [-BeikNnqrstWwX]
[-C directory] [-D variable] [-d flags] [-f makefile]
[-I directory] [-J private] [-j max_jobs] [-m directory] [-T file]
[-V variable] [variable=value] [target …]
-D, not -M; I typoed. I normally would cut and paste to keep that from happening, but WordPress 5 reformats pasting in screwy ways.