Removing Unwanted Software from Your Raspberry Pi

A step-by-step guide on how to remove packages installed in Raspberry Pi using the terminal. …


Updated September 16, 2023

Need help with your Raspberry Pi?
Contact Me!

Do you love silly Raspberry Pi Projects?
Check out my this YouTube Channel!


A step-by-step guide on how to remove packages installed in Raspberry Pi using the terminal.

Are you running out of storage space on your Raspberry Pi? Or, do you want to uninstall a package that is no longer needed? Here’s how to delete packages installed in Raspberry Pi using the command line.

  1. Update Package List and Upgrade System: Before removing any packages, it’s always a good idea to update your package list and upgrade your system. This ensures that you have the latest version of all installed software and dependencies. Open a terminal window and type the following commands:
sudo apt-get update
sudo apt-get upgrade
  1. List Installed Packages: You can view all packages currently installed on your Raspberry Pi by running this command:
dpkg --list

This will show you a list of all the packages with their status, version, and other details. Alternatively, you can search for a specific package using:

dpkg --list | grep <package_name>

Replace <package_name> with the name of the package you are looking for.

  1. Remove Package: To remove a package from your Raspberry Pi, use this command:
sudo apt-get remove <package_name>

Again, replace <package_name> with the name of the package you want to delete. This will remove the package and its dependencies, but it will not delete any configuration files or data associated with that package.

  1. Purge Package: If you also want to delete the configuration files and data associated with a package, use this command:
sudo apt-get purge <package_name>

This is useful if you want to free up storage space or completely remove a package from your system.

  1. Autoremove Unused Dependencies: After removing packages, you may find that some dependencies are no longer needed and can be removed as well. To do this, run the following command:
sudo apt-get autoremove

This will remove any unused dependencies that were installed automatically to satisfy dependencies of other packages.

  1. Clean Package Cache: To free up additional storage space, you can clean your package cache using this command:
sudo apt-get clean

This removes all downloaded package files from the local repository.

That’s it! You have successfully removed a package or packages from your Raspberry Pi. Remember to update and upgrade your system regularly to ensure you have the latest security updates and software versions.