How to Uninstall Programs on Raspberry Pi (Free Up Space)
I conduct many tests on Raspberry Pi that require me to install different applications, but I don’t necessarily clean up afterwards. If you’re here, you might be in the same boat. Let’s learn how to easily uninstall your applications to free up space on your Raspberry Pi.
To remove applications on Raspberry Pi OS with Desktop, you can use the “Add/Remove Software tool” and uncheck the programs to uninstall. It’s also possible to uninstall applications from the command line: sudo apt remove [package_name].
In this article, I will show you how to generate a list of currently installed packages, uninstall applications from your Raspberry Pi, and gain more space on your SD card.
If you’re new to Raspberry Pi or Linux, I’ve got something that can help you right away!
Download my free Linux commands cheat sheet – it’s a quick reference guide with all the essential commands you’ll need to get things done on your Raspberry Pi. Click here to get it for free!
List Installed Packages on Raspberry Pi
Use the Package Manager
Current Status of the SD Card
The first question you might ask is: how do I find the used space on my SD card?
The quickest way to do this is to go to Accessories> File Manager, right-click on the “/” folder (at the very top) and then click Properties.

This window will show you all space used by your files. From there, you can guess the remaining space available depending on the media size.
List Installed Packages
On the desktop, the way to find the installed packages is to go to the package manager: Preferences> Add / Remove Software.
The tool displays installed programs with a checked box, so you can easily find and uninstall them as needed:

Unfortunately, this method is not perfect. There isn’t a way to get a list of all installed packages on one page. You have to enter each category and scroll through the list to find the checked lines.
This is probably the main reason why beginners on Raspberry Pi, or at least those who are not familiar with Linux commands, have trouble removing packages. I’ll give you other solutions for this throughout this post.
Members get an ad-free version of every guide, plus exclusive project support.
Join the Community | Sign In
The good news is that you can see the package size in the bottom-right corner.
You can also go to Options > Package logs, and see the latest changes made to the packages. It looks like this:

This screen displays the latest packages installed and generally allows you to find which ones you can quickly remove.
Note: it still isn‘t perfect, as packages installed with the command line are not shown here. I also noticed that it sometimes doesn’t include the full packages list.
Download the free PDF, keep it open, and stop wasting time on Google.
Download now
If you want to go through the GUI, know that it is possible to install Synaptic, which is a similar tool, but it allows more advanced filters, like only listing installed packages (I suggest it in my favorite apps for Raspberry Pi).
You can find Synaptic in the Add/Remove Software tool.
Then start Synaptic, click Status > Installed in the left menu, and you will get the list of installed packages:

An easier way to view installed packages is via the command line.
Let’s learn how to do this next.
Alternative: Use the Command Line
If you manage to remember these few commands, using a terminal is the fastest way to find the packages installed on your Raspberry.
Disk Usage
Firstly, if you want to see the disk space used in a terminal or ssh, use the df command like this:df -h

The -h option displays values in a human-readable format.
List Installed Packages
To list every package installed on your Raspberry Pi you can use:dpkg -l
This command will list all packages, in this format:

The df command doesn’t display the space used by each program directly, but to find the most significant packages you can do something like this:dpkg-query -W -f='${Installed-Size;8} ${Package}\n' | sort -nr | head -10
(you don’t have to memorize this one ^^)
688414 wolfram-engine 171382 chromium-browser 168481 oracle-java8-jdk 143795 scratch2 114332 raspberrypi-kernel 110694 libgl1-mesa-dri 84603 libreoffice-core 83391 libreoffice-common 49227 quake3-demo-data 47627 gnome-user-guide
This command will list packages that use the most disk space, and sort them by size. You can modify the -10 at the end of the command to get more results.
Download the free PDF, keep it open, and stop wasting time on Google.
Download now

Note: If you’d like to see these steps in action, I have a video on package management just for community members. Join here to watch, and get access to 30+ other lessons for Raspberry Pi along with many other benefits!
How to Uninstall Programs on Raspberry Pi
Now you know how much space is left on your Raspberry Pi, and which packages use the most space. Let’s learn how to remove these programs! It’s not very complicated.
Use the Package Manager
In graphical mode, the search is not very convenient, but removing a package is simple.
Once you find the package to delete, uncheck the box, click Apply at the bottom and confirm.
The package will be uninstalled immediately.
Use the Command Line
Most of the time, you can use apt to remove the package via the terminal.
For example, if I see that I forgot to remove Quake3 from our tutorial, I can do it with:sudo apt remove quake3-demo-data
And that’s it, the package will be deleted and disk space released.
APT also has interesting options you can use from the command line:
- You can ask it to remove all related files with:
sudo apt remove --purge <package>
- Use a wildcard to remove everything related to a specific application or service:
sudo apt remove quake3*
Make sure to carefully check the output, as something using a wildcard can select packages you don’t want to remove. - And use autoremove to uninstall dependencies that are no longer needed:
sudo apt autoremove
Quick note: If you find it hard to remember all these commands, I’ve put them all on a one-page cheat sheet. You can download it for free here so you have it handy whenever you're working on a project.
Prefer videos over reading? The RaspberryTips Community members get exclusive video lessons every month. Join now and watch them all right away. Get instant access.
Tips to Free More Space on Raspberry Pi
I have an entire on this topic that you can find here, but I’ll give you a few tips in this section.
Temporary Files
In theory, temporary files are temporary. This means they are automatically deleted when you restart your Raspberry Pi. But if you can’t reboot it, or you’re stuck, you can empty the folder with one of these commands:
- Remove only old temporary files:
sudo find /tmp -type f -atime +10 -delete - Clear all temporary files (can corrupt some running apps):
sudo rm -rf /tmp/*
Download the free PDF, keep it open, and stop wasting time on Google.
Download now
Related: 3 Commands to Search for a File on Raspberry Pi (and Find It!)
APT Cache
The APT tool caches a large part of the information used, to avoid downloading everything each time you use it.
Clearing this cache may allow you to unlock a stuck Raspberry Pi due to the lack of disk space. Simply execute this command:sudo apt clean
But remember that the cache will return after a system update, so it’s a temporary solution.
As we talk about the cache, if you surf on the internet with your Raspberry Pi, remember to clear the browser’s cache too. I bet that you will gain some valuable MB.
On any browser, you have to go to Options/Preferences to clear the cache.
You might also like: Need a clear GPIO pinout diagram? Here's mine.
By the way, if you are looking for the best web browser on Raspberry Pi, you’ll find the answer here. I tested all of them.
Remove Unused Packages
When you uninstall packages, dependencies often do not automatically uninstall, so you can uninstall them with this command:sudo apt autoremove
But the most effective way to free up space, if you do not use these tools is to uninstall wolfram-engine and LibreOffice. This tip will allow you to gain about 1 GB of disk space in 10s.
Use these commands:sudo apt remove --purge wolfram-engine libreoffice*
sudo apt autoremove

Yes, I do!
Find Other Big Folders and Files
Ok, let’s say you still have a disk space issue.
Download the free PDF, keep it open, and stop wasting time on Google.
Download now
We saw how to remove packages or clear different caches, but this is not necessarily the most important part of your used disk space.
You might also like: Tired of Raspberry Pi OS? Level up with these top-rated systems.
If you have a huge log file or hundreds of photos/videos stored on your SD card, you’ll have to deal with it before, but how do you find them? Let’s learn how.
Graphical Way:
“Gnome utility” is a great tool that you can use (the package name is baobab). You can find it in the Add/Remove software tool, search for “baobab”.
It will graphically show you exactly how much free space you have left and which folder is taking up a lot of space:

Thanks to this, it will be much easier to find a file that you would have missed.
I talk a bit more about this in my article on how to free up space on a Raspberry Pi.
Command Line:
In a terminal, you can do something similar.
du is a command available directly on Raspberry Pi OS (and most other Linux distributions).
It lists the size of the files and folders on the disk.
Read next: 7 Surprising Uses for a Raspberry Pi
With some additional options, we will get the same result as the graphical tool:
- You can see the size taken by each subfolder like this:
sudo du -h --max-depth=1 /
- And you can also find the biggest files on the disk like this:
sudo du -ak | sort -nr | head -50
You can change the -50 options to get more or fewer files in the list.
Don’t pay attention to access errors when running the command.
You have now learned how to uninstall packages on your Raspberry Pi, and also some tips to free space on your SD card (I go into more details here).
And of course, if you have a lot of issues with your SD card, it might mean that it is too small and you will have to think about changing it. It does not cost much nowadays, so you will be relieved.
Check out my review of the best SD cards for Raspberry Pi if you don’t know which to choose.
USB can also be a solution if you really need a lot of space. I explain how to choose between SD cards and USB drives here.
Whenever you’re ready, here are other ways I can help you:
Test Your Raspberry Pi Level (Free): Not sure why everything takes so long on your Raspberry Pi? Take this free 3-minute assessment and see what’s causing the problems.
The RaspberryTips Community: Need help or want to discuss your Raspberry Pi projects with others who actually get it? Join the RaspberryTips Community and get access to private forums, exclusive lessons, and direct help.
Master your Raspberry Pi in 30 days: If you are looking for the best tips to become an expert on Raspberry Pi, this book is for you. Learn useful Linux skills and practice multiple projects with step-by-step guides.
Master Python on Raspberry Pi: Create, understand, and improve any Python script for your Raspberry Pi. Learn the essentials step-by-step without losing time understanding useless concepts.
You can also find all my recommendations for tools and hardware on this page.

Excellent tips here. Helped me a lot, thanks
Do you know how to reset a Raspberry Pi Pico using Arduino IDE. I programmed the board using arduino, and now it does not show up anywhere on my pc when plugged in except for arduino?