Out of Memory? Raspberry Pi

If you’re like me and ordered raspbian preinstalled on a 4gig card for model B pi, then you are also like me and have installed maybe two packages before you can’t run

sudo apt-get upgrade

You end up returning this error:

You don't have enough free space in /var/cache/apt/archives/.

So what do we do?

Well I just ordered another 16 gig card, I know, I could have bought a sd card, installed it for free and whatever… But I like to keep things easy.

In the mean time, if you need a couple extra megs, you can clean out your apt cache. It’s located here:

/var/cache/apt/archives

And if you try and get the disc usage of this folder you will see how much space your can clear out. Basically, apt just keeps cached copies of the packages in case you need to install them again, so most likely you’ll be ok if you remove them. To see how much storage you are using in this directory type:

cd /var/cache/apt/archives
du -sh .

I returned like 256 MB. So I cleared the cache:

sudo apt-get clean

And looked at how much memory I have available:

free -h

Before:

After:

3 thoughts on “Out of Memory? Raspberry Pi

  1. Nice post, dood.
    I’m using Xbian and had 1.3GB in use.
    Well, after apt-get clean I got 100mb free.
    My /var is nearly 500MB. Hopefully there is mre I can remove.

Leave a Reply

Your email address will not be published. Required fields are marked *