brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: dpkg -L lists every file an apt package put on your system

Apt
~/tips/tip-apt-dpkg-l-list-files

dpkg -L nginx-common | grep etc

Lists all the files that an installed package has put on disk.

After an install I often want to know where the config file and the binaries ended up.

dpkg -L nginx-common | grep etc
dpkg -L htop | grep bin

dpkg -L prints all paths that belong to an installed package, including directories. Filtering with grep quickly turns up the config files and the service unit. Configuration files marked as conffiles are also shown by dpkg --status in the Conffiles field. A file that is listed here might still have been deleted by hand, so check that it exists before you rely on it.

Further reading: dpkg manual page

More Apt tips sudo apt-mark minimize-manual apt list '~c' grep -E ' (install|upgrade|remove) ' /var/log/dpkg.log | tail -o Dpkg::Options::="–force-confold" upgrade sudo apt-get -d -y full-upgrade All Apt tips (42) All topics

Link