Are you having problems with storage space on your Raspberry Pi? Me too!
I was recently attempting to compile OpenCV on a Raspberry Pi 3 with an 8GB SD card when it crapped out complaining of a lack of disk space. Now, OpenCV does need a lot of room to compile, but come on 8GB? Err, no. As it turns out, as the Pi has become more popular and Raspbian has evolved its picked up quite a lot of (very good) default application along the way. This is great for the Pi’s primary purpose of education, but for those of us with more advanced ambitions and aspirations it can become a problem.
Fear not dear reader, there is a solution!
You can reclaim >1.1GB of your SD Card simply by removing a whole host of programs and associated packages that are installed by default and that you probably never use. For example I run the following commands from the console:
$ sudo apt-get purge wolfram-engine libreoffice libreoffice-* nodered \ bluej greenfoot scratch sonic-pi minecraft-pi -yq $ sudo apt-get autoremove -yq
This removes all of LibreOffice, all of the Java IDE’s (Java? When you have Python?!), Wolfram (over 600MB!), Scratch, Sonic Pi and Minecraft. And, Voila! I can now compile OpenCV and get on with taking over the world!