Do I need multiple versions of Compat libraries?

I saw on a system updated from long time a lot of Compat library versions compiled from poirts?

Do I really need them of can I safely delete them with no conseguences like pkg deleteseems to suggest?
 
You only need the compat libraries if you still have binaries that are linked against those libraries, i.e. they were compiled on those older releases. If you have updated or rebuilt everything, then you don't need the compat libraries anymore. For a quick check, you can use this command line (bourne shell syntax, doesn't work with csh):
Code:
ldd /usr/local/*bin/* 2>/dev/null | awk '/:$/ {B = $0} /compat/ {if (B) print B; B=""; print}'
If it doesn't print anything, then there are no binaries linked against compat libraries. Otherwise it lists those binaries and libraries.
Note, however, that the above command only checks binaries in /usr/local/bin and /usr/local/sbin. There might be binaries in other locations, too, for example in libexec or in users' home directories. If you want to be really sure, you'll probably need to traverse the whole file system with find(1).
 
Back
Top