APT command in detail.

Introduction

Search

apt search gimp

List

apt list gimp
apt list --installed
apt list --upgradeable

Show

apt show gimp

Install

sudo apt install gimp

Remove

sudo apt remove gimp
sudo apt remove --purge gimp

Clean up

sudo apt autoremove
sudo apt purge gimp

Update

sudo apt update
apt list --upgradable

Upgrade

sudo apt upgrade
sudo apt update && sudo apt upgrade
sudo apt full-upgrade

In a nutshell:

  1. ctrl + alt + t the keyboard shortcut for opening terminal.
  2. apt search packagename for searching packages.
  3. apt list packagename for getting a specific package that is looking for.
  4. apt list --installed for getting installed packages in the system.
  5. apt list --upgradable for getting upgradable packages in the system.
  6. apt show packagenameto know details about packages.
  7. sudo apt install packagenamefor installing new packages.
  8. sudo apt remove packagenamefor removing packages.
  9. sudo apt purge packagename for removing packages and extra config files that are no longer needed.
  10. sudo apt autoremove for clean up unnecessary config files or packages from your system.
  11. sudo apt update packagename && sudo apt upgrade packagename for updating and upgrading a single package.
  12. sudo apt update && sudo apt upgrade for updating the cache file and upgrading packages that are available.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store