APT Package Management: Most Used Commands

We can use three commands to manage debian deb packages:

  • apt which is the newly user friendly command
  • apt-get a wrapper arround dpkg command
  • dpkg full feature and complex command

List packages

dpkg --list

Remove package

sudo apt-get purge <packagename>

Remove package along with dependencies that are installed with those packages

sudo apt-get purge --auto-remove <packagename>

Remove unused dependencies

sudo apt-get autoremove

Clean packages

sudo apt-get clean