Paying attention to:
- Only
apt - Not
dpkg - Not
apt-get - Not
aptitude
Paying attention to:
aptdpkgapt-getaptitudeThere is no such thing, because apt doesn't install packages, it finds and downloads packages to install and their dependencies and then gives them to dpkg to install. So all packages installed with apt are actually installed with dpkg.
See also:
It supports glob patterns for matching package names as well as options to list:
search for all packages:
apt list
search for a package installed or not
apt list <package-name>
apt list gnome-calculator #example
returns
gnome-calculator/jammy,now 1:41.1-2ubuntu2 amd64 [installed,automatic]
apt list -a google-chrome-stable
returns
google-chrome-stable/stable 101.0.4951.54-1 amd64 [upgradable from: 101.0.4951.41-1]
google-chrome-stable/now 101.0.4951.41-1 amd64 [installed,upgradable to: 101.0.4951.54-1]
apt list is similar to dpkg-query dpkg -s but with dpkg is longer and needs to uses other tooling to filter result like grep.dpkg -s google-chrome-stable | grep "Status"` //with dpkg
Status: install ok installed //returns