CompTIA Linux+ (XK0-004)
Red Hat Enterprise Linux
Git and Github
Learn Docker and Kubernates
Tips and Tricks

5.5 Installing Packages with APT & Deb

Learning to install packages using APT and Deb

Deb (Debian Packages)

  • sudo dpkg -i package_name.deb: Installs a downloaded Debian package.

  • sudo dpkg -r package_name: removes an installed package

  • sudo dpkg -l: Lists all the installed packages

  • sudo dpkg -l | grep -w package_name: Greps out a package if installed


  • sudo apt update: update is used to resynchronize the package index files from their sources (/etc/apt/sources.list).

  • sudo apt upgrade: upgrade is used to install the newest versions of all packages

  • sudo apt remove package_name: removes everything except the config files.

  • sudo apt purge package_name: removes everything related to the package except the dependencies.

  • sudo apt autoremove: it removes unused dependencies.

  • sudo apt-cache search package_name: It searches for the repo that a package belongs to.