Thursday, May 2, 2024
29
rated 0 times [  29] [ 0]  / answers: 1 / hits: 85870  / 2 Years ago, sat, may 28, 2022, 4:52:26

I want to get the list of installed library packages only from terminal.



Is there any command for that?


More From » command-line

 Answers
2
/sbin/ldconfig -p


The -v option will show the libraries version.



Result:



267 libs found in cache `/etc/ld.so.cache'
libz.so.1 (libc6) => /usr/lib/libz.so.1
libz.so (libc6) => /usr/lib/libz.so
libxslt.so.1 (libc6) => /usr/lib/libxslt.so.1
libxml2.so.2 (libc6) => /usr/lib/libxml2.so.2
libxcb.so.1 (libc6) => /usr/lib/libxcb.so.1
libxcb-xlib.so.0 (libc6) => /usr/lib/libxcb-xlib.so.0
libwrap.so.0 (libc6) => /lib/libwrap.so.0
libvolume_id.so.0 (libc6) => /lib/libvolume_id.so.0
libuuid.so.1 (libc6) => /lib/libuuid.so.1
libutil.so.1 (libc6, hwcap: 0x8008000000008000, OS ABI: Linux 2.6.8) => /lib/tls/i686/cmov/libutil.so.1
libutil.so.1 (libc6, OS ABI: Linux 2.6.8) => /lib/libutil.so.1
libutil.so (libc6, OS ABI: Linux 2.6.8) => /usr/lib/libutil.so
libusb-0.1.so.4 (libc6) => /lib/libusb-0.1.so.4
libusb-0.1.so.4 (libc6) => /usr/lib/libusb-0.1.so.4
libulockmgr.so.1 (libc6) => /lib/libulockmgr.so.1
libt1x.so.5 (libc6) => /usr/lib/libt1x.so.5
libt1.so.5 (libc6) => /usr/lib/libt1.so.5
libtiff.so.4 (libc6) => /usr/lib/libtiff.so.4
libticw.so.5 (libc6) => /lib/libticw.so.5


If you want to turn that list into a list of packages, you can do something like this:



dpkg -S $(/sbin/ldconfig -p | awk 'NR>1 { print $NF }')


And you can further massage that to cut out errors, unneeded components and duplicates:



$ dpkg -S $(/sbin/ldconfig -p | awk 'NR>1 { print $NF }') 2>/dev/null | sed 's/: .*$//' | sort -u
akregator
ark
binutils
calligra-libs
comerr-dev
compiz-core
dolphin
e2fslibs:amd64
freeglut3:amd64
gettext
...

[#26519] Sunday, May 29, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
reangi

Total Points: 213
Total Questions: 102
Total Answers: 114

Location: Namibia
Member since Wed, Jan 19, 2022
2 Years ago
reangi questions
;