
apt / apt-get
The apt and apt-get is a package management system for Debian. It supports you to install packages while resolving dependencies. The apt is the improved version of apt-get, so you should use apt basically. The apt-get and apt-cache were unified to be “apt”.
- How to check package version
sudo apt show ${pkg-name}
sudo apt-cache showpkg ${pkg-name}
- How to install a specific version using apt-get
sudo apt install ${pkg-name}=version
- remove package completely
sudo apt remove --purge ${pkg-name}
dpkg
The dpkg is also a package management tool for Debian. But it can be used for each package installation. It is often used for local file installations, but cannot resolve software dependencies.
- show installed packages
dpkg -l
- remove a package
dpkg -r ${pkg-name}
- install a package
dpkg -i ${pkg-name}