apt install/uninstall
Installing Locally
Some linux distributions (like ubuntu) are debian based, thus they install software through files with a .deb
extension.
The program that is responsible for installing .deb
files is dpkg
.
If you have a .deb
file locally, you can install it using dpkg
like so:
sudo dpkg -i <path_to_file.deb>
Installing From Repo
There are repos (on the internet, or maybe locally on your computer) that host debian packages. To install from a repo, you use apt
or apt-get
. apt-get
is the lower level command that apt
uses. It claims to present a “nicer” interface. Most online code examples use apt-get
though.
To install a package using apt-get
:
sudo apt-get install <package_name>
Uninstalling
To uninstall a package installed via apt-get cleanly:
sudo apt-get purge --auto-remove packagename
purge
(instead ofremove
) removes configuration files as well (system wide config files)--auto-remove
will remove any dependencies of the package that aren’t used by any other installed packages