We can uninstall such packages which are of no use from the terminal as well as from the GUI method. In this write-up, both these methods of uninstalling software from the Raspberry Pi have been explained.
How to uninstall the software from the Raspberry Pi OS using the CLI
To uninstall the software from the Raspberry Pi OS using the command line, in order to free some space there are different methods which are:
Method 1: Using the remove command
This method is used when you want to remove any package or software without removing its configuration files from the Raspberry Pi OS. The general syntax of using the remove command with an apt package manager to uninstall any package is:
To understand it, we will uninstall the package of vim editor using the above syntax:
In the above command, “-y” is used to confirm the removal of the package and on the successful execution of the command, the vim package has been removed from the Raspberry Pi OS without removing its configuration files.
Method 2: Using the purge command
Another command to uninstall the package using the terminal of the Raspberry Pi OS is with the use of purge command with the apt package manager. This will remove the package along with its configuration files and other related files from the directory of the Raspberry Pi OS and the general syntax of using the purge command is:
To understand its use, we will remove the VLC media player from the Raspberry Pi OS using the purge command:
After the execution of the above command, the VLC media player has been permanently removed from the Raspberry Pi with its all configuration files.
Method 3: Using the clean command
This command is used to remove all the cache and archive files from the Raspberry Pi OS and will free the memory. In order to use the clean command, use the command:
Method 4: Using the autoremove command
This command is used to delete all those packages from the Raspberry Pi OS, which are either outdated or haven’t been used for a long time. The command of the autoremove in the Raspberry Pi OS is used as:
How to uninstall the software from the Raspberry Pi OS using the GUI
The most convenient way to remove any software from the Raspberry Pi OS is by using the Graphical User Interface (GUI). Go to the Raspberry Pi Icon on the top left corner of the screen, choose the “Preferences” and then click on the “Add/Remove Software”:
Search for the package or software which you want to remove, let us say we want to remove the “Geany” software so we will search for it in the search bar. The results will be displayed on the screen, right-click the mouse button on the selected result and choose the “Remove Package” and then click on the Apply button:
>>Why this screenshot is blurred<<
It will confirm once again about the removal of the packages, click on the “Continue” button:
Lastly, for authorization purposes, it will ask for the user account password, give it and press on the “Ok” button to remove the software:
The Geany software has been successfully uninstalled from the Raspberry Pi OS.
The Raspberry Pi is a Debian-based Linux distribution in which we can manage the packages with the apt package manager. The uninstallation of the packages on the Raspberry Pi makes the memory free for the new packages. In this write-up, we have explained the different command-line methods to uninstall the packages from the Raspberry Pi OS as well as the graphical user interface method.