'No space left on device' and how to free it up?

Hello my friends. I have a TP-LINK TD-W8970 with 8 MB of Flash memory.
I was going to install openvpn on my openwrt using following commands:

opkg update
opkg install openvpn-openssl

Suddenly it show the 'No space left on device' message. so, I check the available space on the device, and here is the result (df command):

Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/root                 3584      3584         0 100% /rom
tmpfs                    29096       384     28712   1% /tmp
/dev/mtdblock4            2496      2416        80  97% /overlay
overlayfs:/overlay        2496      2416        80  97% /
tmpfs                      512         0       512   0% /dev

I reboot the device, but the memory still full. although the installation of package unfinished, so I have nothing to remove to free up my space.
now every time I login via SSH, this alert appears:

Your JFFS2-partition seems full and overlayfs is mounted read-only.
Please try to remove files from /overlay/upper/... and reboot!

So please help me about this things:

  1. How to remove unfinished package ( opkg install openvpn-openssl) to free up the space?
  2. Is there a solution to increase the available space? like using USB Flash drive as secondary partition for installing packages on it.

The jffs2 overlay is much less space-efficient than the squashfs root. Try creating a custom image with the packages you need and avoid installing packages with opkg.


Take a backup of the configuration and the list of installed packages, run a factory reset using firstboot and then reconfigure the device.


1 Like

Thanks.But that's too advance to me.

Is it the only solution? This does not make sense! Is there any way to get rid of unnecessary files without factory reset? I just need to remove openvpn related files, but the problem is the openvpn-openssl does not install completely, so I can't find and remove it simply by entering the opkg remove openvpn-openssl.

It's most likely your only choice, though. The documentation is rather helpful.


All the overlay files are in /overlay/upper
Just go there, use ls, find the files (in /overlay/upper/usr/lib ???) and remove it with rm

1 Like