I was downloading a file while connecting over ssh using wget. The download failed:

Cannot write to `serviio-0.6.2-linux.tar.gz' (No space left on device).
pi@raspberrypi:~$ Write failed: Connection reset by peer

I can no longer communicate with the pi over ssh, and resetting it didn't seem to help. Do I need to flash the SD card and start again?

  • Very short answer is No. Is your normal computer Linux or Windows? Jun 30, 2012 at 14:28
  • Windows. I gave up with the SD and tried reformatting it. Windows insisted it would only format 75MB, so something's gone quite wrong somewhere.
    – Tom Medley
    Jun 30, 2012 at 16:13
  • 1
    I think that's the boot partition, which is the only partition Windows can read. Jun 30, 2012 at 16:22
  • @AlexChamberlain When I tried to use the formatting program to reformat the card with the debian image it said there wasn't enough space on the disk, which was strange. How do I recover the card?
    – Tom Medley
    Jun 30, 2012 at 16:26
  • I doubt you damaged your partition table; I suspect Windows just won't read the Linux/Linux Swap partitions. Jun 30, 2012 at 16:31

3 Answers 3


I very much doubt it is irreparable, however this is a perfect example of why /var should not be on your root partition. Everytime your machine wants to log a message or start a process it makes small but significant writes To /var. Without these writes the system cannot function.

I'll say it again for everyone:

/var should not be mounted on your root partition!

As for solving your problem, you will need to do one of the following:

  • Mount the SD card on a Linux machine and delete uneccessary files.
  • Reflash the image.

For the future, an elegant solution is to mount var directly in RAM by adding this line to /etc/fstab:

tmpfs /var tmpfs nodev,nosuid,size=50M 0 0
  • See my question here regarding this: raspberrypi.stackexchange.com/questions/882/… Jul 2, 2012 at 9:15
  • Putting the whole /var on tmpfs (= blank at every boot) seems pretty extreme. Have you tested this?
    – XTL
    Apr 15, 2013 at 13:17
  • @XTL Yes. As long as you don't care if your logs persist it doesn't have any adverse effects.
    – Jivings
    Apr 16, 2013 at 6:35

Try booting into a Linux Live CD and plug in your SD card. You should be able to mount it and delete some files.

If you need to remove packages, you may need to install an emulator onto the SD card, or an image thereof.


As others have suggested, you shouldn't need to wipe your card, you should be able to free up space; But if you do think it's easier just to wipe the card and start you can use the SD Formatting Tool The Secure Digital Standard has an official website!

it's a useful utility for your tool belt.

  • 1
    This answer doesn't really add anything, it would probably be better as a comment.
    – Jivings
    Jul 2, 2012 at 15:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.