Quoting Graham Perrin <grahamper...@gmail.com> (from Mon, 14 Dec 2020 07:41:45 +0000):

Re: <https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/makeworld.html#updating-src-completing-check-old> I made careless use of:

cd /usr/src && make -DBATCH_DELETE_OLD_FILES delete-old-libs
[...]
Please: how can I positively identify other applications that I might have broken through careless deletion of old libraries?

% cat remove_old_libs_with_unresolved_libs.sh
#!/bin/sh

find /usr/local/*bin* /usr/local/lib* -type f \
| xargs ldd -f '%p|%A\n' 2>/dev/null \
| grep '^not found' | grep compat/pkg | cut -d '|' -f2 \
| sort -u | xargs rm -v

% cat list_ports_using_nonexisting_lib.sh
#!/bin/sh

find /usr/local/*bin* /usr/local/lib* -type f \
| xargs ldd -f '%p|%A\n' 2>/dev/null \
| grep '^not found' | cut -d '|' -f2 \
| xargs pkg which -q | sort -u


Bye,
Alexander.

--
http://www.Leidinger.net alexan...@leidinger.net: PGP 0x8F31830F9F2772BF
http://www.FreeBSD.org    netch...@freebsd.org  : PGP 0x8F31830F9F2772BF

Attachment: pgpSusmXjZQix.pgp
Description: Digitale PGP-Signatur

Reply via email to