The Raspberry Pi was created by Eben Upton from the University of Cambridge, and was originally intended to teach programming in schools. With its most recent releases, the Raspberry Pi has grown to the point that it can now be used as a desktop computer.

The Raspberry Pi gives you access to a practically unlimited source of software. In this article, we will discuss the various ways to install, configure, and remove software from the Raspberry Pi.

Loading Software from the Desktop

Before adding any new software, it’s good to run the update command from the terminal using sudo apt-get update to ensure your list of applications is completely updated.

An easy way to load new software packages is found under Applications > Preferences > Recommended Software.

From Recommended Software, you can select from seven different categories of applications and utilities.

A much larger location (Repository) is available to find up to 21 categories available by selecting the Add/Remove Software tab from the Preference menu. This is the official Repository of Raspbian packages that have been approved for use with the Raspberry Pi.

Command Line Software Installation

In some cases, users will choose not to load the desktop environment, possibly to save disk space or set up a server they prefer using the command line interface. The most common method for adding software from the command line is APT, or the Advanced Packaging Tool. To load software from the Repository, you use the following command to search for a specific program: apt-cache search <package info>.

For example, I use a program called GPARTED for managing drive partitions. The code apt-cache search gparted will give a list of the available partitioning managers referenced. Notice that this command is not case sensitive, it works with Gparted, GPARTED, or gparted, but when you actually load or remove the application, it is case sensitive. Be sure to check the response from the search for the exact name.

To load the GPARTED package, enter sudo apt-get install gparted -y and it will load the package, which will then appear in the Application Menu – System Tools. In the command, notice that you need the administrative privilege to perform the command, hence, sudo was added by adding -y at the end so you won’t be prompted before the command is completed.

To remove packages using APT as before, you will need to use sudo for permission like this: sudo apt remove gparted.

Using the Wget Command

Wget is a very useful command-line application used to download files from the internet. Unlike other commands, if you get accidentally disconnected from the network, wget allows you to restart where you left off. It is very handy when working on less reliable connection methods or creating scripts to assist users when downloading or creating cron jobs. Wget does not require users to be logged in to initiate a download. It can also be set up to run in the background with no user intervention.

The program should be included in Raspbian, but to verify that it has been installed, enter wget. If you see the following, you know it has been included in your system:

If you get a response saying wget command not found, enter sudo apt-get install wget

Here are some other options you can use with wget:

  • Download a file from the internet – wget [URL]
  • Save a downloaded file under a specific name: wget -O [file-name] [URL]
  • Download a file from the internet to a specific directory: wget -p[directory] [URL]
  • Download a file that may have been interrupted during a previous download: wget -c [URL]
  • Download multiple files from the internet: wget -i list_of_files.txt
  • Create the list_of_files.txt text editor like nano: nano list_of_files.txt

How to Download Python Packages

Most Python packages are available in the Raspberry Pi archives and can be installed using apt install. However, some packages may not be available from the archives and/or may be outdated. Alternatively, you can install Python from the Python Package Index http://pypi.org using the pip tool.

Pip is included in the Raspberry Pi image unless you loaded the lite version of Pi. There are two versions of the pip program, one for older versions of Python, the Python 2. To upload the version, use sudo apt install python3-pip for Python 3, and sudo apt install python-pip for Python 2.

Pip modules are prewritten pieces of code you can include in Python programs you write. In the C language, you use libraries to include prewritten code with #include . In Python, you use modules with import.

Raspberry Pi includes numerous Python modules. For a list of the modules, enter sudo pip3 list. Enter the following command to see if a certain module has been loaded: sudo pip3 list | grep guizero .

If you want to load the module, enter the following: sudo pip3 install guizero. After the command completes, run sudo pip3 list | grep guizero to confirm its been loaded. The Python 3 modules are located in /usr/bin/python3.7.

To remove packages installed with pip, enter pip uninstall <package>.

Working with the Git Repository

Github is a cloud-based hosting platform for software developers worldwide. This greatly simplifies changes and updates to the software by allowing developers access to the code without directly accessing the original source code, allowing them to modify, debug, or add features to the code. Once tested and verified, the code can be merged back into the original source code.

Changes made to the original code are automatically tracked. Without Github, anyone wanting to collaborate on an open-source project would be required to obtain the source code, make any modifications, then send it back to the person maintaining the project who would have to determine if the changes should be incorporated. The Github platform allows developers to share code with other developers worldwide.

To download source code from Github, enter www.github.com to open the web site.

In the search screen, enter Arduino Blink.

Select schacon/blink.

Click on the green button CODE, then select Download ZIP. When the download is complete, open the Downloads directory then unzip the file Blink-master.zip.

Thanks for reading this tutorial on how to install and remove software on the Raspberry Pi. Leave a comment below if you have questions about anything!