Cleaning up disc space on BBB

I want to free up space on the BBB hard drive. BeagleBone Cookbook mentions removing Chromium and OpenCV. What other files or programs are good to remove? I notice in /usr/lib is a bluetooth folder, my BBB does not have bluetooth, does any other program use this for something? If not it should be safe to remove.

How have you freed up drive space? What packages have you deleted?

Have a Blessed day!
Don

Its much safer to get a bigger SD card if that is how you boot it now. I am not a big fan of deleting stuff that is on a “factory” image. If it is stuff you installed after the fact then

$ sudo apt autoremove <package name>

Make sure all your drive space is being utilized some of that is left unallocated so might look into that. Might have to adjust your partition size.

If you are using the desktop version you will probably want to run it from an SD card. The 4Gb eMMC will fill up very quickly otherwise.

I would not even try to run the desktop version personally. There is not really enough RAM on the BBB boards for a desktop running GUI apps. It can be done, but will be painfully slow.

Depending on your needs, you can go with the IOT version which takes up around 2Gb of space. This does not have the desktop or the desktop apps, but does have the cloud9/web server stuff. Not sure what the other differences are.

There is also a minimal install version. I haven’t got this to hand, but expect it will take less than 2GB and probably does not have the cloud9/webserver stuff.

It is better to start with a minimal install and then install the packages you need, rather than try to remove stuff to free up space.

You can get a pretty minimal Linux install for anything between 50Mb - 250Mb depending on your needs if you want to go full custom build.

Thank you for your replies. I put a 32G Micro SD card I had laying around, ran grow_partition.sh and am now good.

But that raises an engineering question: if my application is to put my code in the BBB to perform a function for a customer then give the BBB to the customer is it better to use an SD card or have the program in the eMMC. My thinking is to have the code internal and you don’t have to worry about the SD card coming out by accident. My code will be nowhere near 4G. What do you all think best practice should be?

Have a Blessed day!
Don

It depends on many factors. Not too many “right” or “wrong” solutions. eMMc is the best way to go for most stuff. If you are logging data / heavy write/erase then map that directory to an SD card and leave the rest in eMMc.

sudo du -shx /*

I got this command from the beaglebone-cookbook.

Beyond the Basics — BeagleBoard Documentation

This will help you find the biggest files on your board.

Seth

Once you discover ncdu you’ll wonder why you tried anything else…

ncdu -x /

Regards,

2 Likes

ncdu can read /proc/!