APT commands

The following are the useful commands for APT (this is pre-installed by default on Raspbian):

  • Always update the package list to obtain the latest versions and programs before installing a package with the sudo apt-get update command
  • Find software by searching for any packages that include the <searchtext> command in the package name or description using sudo apt-cache search <seachtext>
  • Install software with a particular <packagename> using sudo apt-get install <packagename>
  • Uninstall a particular software package using sudo apt-get remove <packagename>
  • Display the currently installed version of a software package using sudo apt-cache showpkg <packagename>

If you want to install a specific version of a software package, use ...

Get Raspberry Pi 3 Cookbook for Python Programmers - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.