APT (Advanced Package Tool)

checking that python3-pip package is installed
dpkg --get-selections python3-pip

search packages by name using REGEX
see http://newbiedoc.sourceforge.net/tutorials/apt-get-intro/info.html
apt-cache search libapr
apt-cache search 'php.*sql'
apt-cache search apache.\*perl
apt-cache search elvis\|vim

list the contents of a (not-installed) package
see https://unix.stackexchange.com/questions/6311/how-to-find-out-which-not-installed-package-a-file-belongs-to
apt-file list mysql-client-5.1

showing package information
apt-cache showpkg libconfig-dev

check a package status
dpkg --get-selections | grep apache2

find which package contains a file
use also http://www.debian.org/distrib/packages#search_contents
sudo apt-file update
apt-file -i search --regex /knemo-modem-transmit-receive.svg$ -> doesn't work for this specific file
apt-file -i search knemo-modem-transmit-receive.svg -> doesn't work for this specific file
apt-file search fusil/fusil-ogg123 -> this works so for the above fails maybe the repository from where the files were installed now is missing
dpkg --search knemo-modem-transmit-receive.svg -> but this one works (with owning package installed)
dpkg -S 'doc/*sql'

show package summary & contents
dpkg -l mongodb-compass
dpkg -L kibana
dpkg-query -L kibana

install deb file with automatic dependency resolution
sudo apt-get install ./Downloads/skypeforlinux-64.deb

install all packages you need to compile $PACKAGENAME
https://askubuntu.com/questions/481/how-do-i-find-the-package-that-provides-a-file
apt-get build-dep $PACKAGENAME

list repositories
grep -rh ^deb /etc/apt/sources.list /etc/apt/sources.list.d/

remove repository
sudo add-apt-repository --remove ppa:whatever/ppa

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.