An SD card is considered as the backbone of the Raspberry Pi device. The unnecessary usage of your SD card may reduce device performance. So, it’s better to remove the unnecessary disk usage to boost up Raspberry Pi’s performance.

In this tutorial, we will guide you in saving your Raspberry Pi disk space by finding the applications that are consuming large space on your device’s SD card so that you can remove them.

How to save disk space on Raspberry Pi and purge bloat

Here, you will find two methods that will help you in identifying those applications or software packages that are utilizing excess space on your disk. You can remove these applications to save disk space on your Raspberry Pi device. However, before moving towards the methods, first you will need to find out the file system on your Raspberry Pi’s SD card using the following command:

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2022/06/echo/word-image-184981-1.png" data-lazy- height="187" src="data:image/svg xml,” width=”808″>

From the above output, you can see that 7% of your SD card space is utilized. It may be different in your case. Now, the task is to free up the space to enhance the device performance.

The details of these methods are provided below:

1: Finding the Large Size applications through dpkg command

To find out the information of the large size applications installed on your Raspberry Pi device, you can use the dpkg command to get the list of installed applications.

$ dpkg-query -Wf ‘${Installed-Size}t${Package}n’ | sort -n -r | head -n 25

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2022/06/echo/word-image-184981-2.png" data-lazy- height="484" src="data:image/svg xml,” width=”807″>

The above command will sort out the applications and provide you with the list of top 25 large size applications in descending order.

Now, if you want to remove the large size application from your Raspberry Pi device, use the purge command as this will completely remove the selected package from your system.

$ sudo apt purge chromium-browser -y

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2022/06/echo/word-image-184981-3.png" data-lazy- height="443" src="data:image/svg xml,” width=”809″>

In this way, you can completely remove large size applications from your Raspberry Pi to free up the disk space.

2: Finding the Large Size Applications through Aptitude Utility

Aptitude is a simplified package management utility that will help you in finding the information of those applications that are utilizing large storage space. First, you will need to install this application on your Raspberry Pi device through following command:

$ sudo apt install aptitude -y

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2022/06/echo/word-image-184981-4.png" data-lazy- height="394" src="data:image/svg xml,” width=”808″>

After the installation, you can view the list of top 20 application with large size by issuing the following command:

$ aptitude search “~i” –display-format “%p %I” –sort installsize | tail -20

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2022/06/echo/word-image-184981-5.png" data-lazy- height="466" src="data:image/svg xml,” width=”805″>

The above command will provide you with the list of large applications in ascending order. You can pick the one you want to remove to free up the disk space on your Raspberry Pi device through the following command:

$ sudo apt purge <application_name> -y

In this way, you can remove several applications or software packages from your Raspberry Pi device that you are not using for a longer time. This will save your disk space and allow the device to provide you with a better performance.

Conclusion

The performance of your Raspberry Pi highly depends on disk space as less disk space slows down the device performance. To save disk space on your Raspberry Pi device, you will have to follow the two methods given in this guide that allow you to remove the unused large size applications from your device completely.

About the author

<img data-del="avatar" data-lazy-src="https://kirelos.com/wp-content/uploads/2022/06/echo/unnamesadadsasdd-150×150.jpg62a7e9db546e3.jpg" height="112" src="data:image/svg xml,” width=”112″>

Awais Khan

I’m an Engineer and an academic researcher by profession. My interest for Raspberry Pi, embedded systems and blogging has brought me here to share my knowledge with others.