A shared library is a file that can be used by numerous programs. The ldd command can be used to list the shared libraries required by a certain program. In this example, there are 4 shared library files used by bash.
[root@server1 ]# ldd /bin/bash linux-gate.so.1 => (0x0059100) libtinfo.so.5 => /lib/libtinfo.so.5 libdl.so.2 => /lib.libc.so.6 /lib/ld-linux.so.2
Determine unused dependencies
The -u or --unused option can be used to determine if any of the shared library files are not being used. In this example, the /lib/ld-linux.so.2 is not being used by bash.
[root@server1 ]# ldd -u /bin/bash /lib/ld-linux.so.2