dpkg operates on individual packages. It does not handle dependencies.
apt-get is a low level package management system that installs and removes packages along with dependencies. It is a stable, low level tool that has a dependeble ui.
Performs various operations on the package cache.
apt is a more user friendly tool. It’s ui may change and improve.
Package name and one line description
apt-cache search .
Not a pleasing format
apt list --all-versions
dpkg --get-selections | grep -v deinstall
Shows a one line description as well
dpkg -l
apt list --installed
apt-get install <package-name> [<package-name> ...]
apt install <package-name> [<package-name> ...]
Install from a deb file.
sudo apt install ./<deb-filename>
apt-get remove <package-name>
apt remove <package-name>
Purge removes all configuration files as well
apt-get purge <package-name>
apt purge <package-name>
Autoremove removes packages that were auto installed an no longer needed.
apt-get autoremove <package-name>
apt autoremove <package-name>
Information is not that useful but it has a multi-line description.
dpkg show <package-name>
apt show <package-name>
Display information about a .deb file.
dpkg-deb -I <deb-filename>
dpkg -L <package-name>
First update the cached list of available packages and then upgrade installed packages. You should normally run these consecutively.
apt-get update <package-name>
apt-get upgrade <package-name>
apt update <package-name>
apt upgrade <package-name>