Not enough free space to delete files?

I'm attempting to upgrade packages on my dumb AP, however I've run out of free space on the internal memory. This model has no USB or SD card ports to expand storage, unfortunately.

Since it's a dumb AP, I thought removing packages for dnsmasq and firewall would be a way to get some easy free space. However on attempting to remove the packages I get this error:

Collected errors:
 * pkg_get_installed_files: Failed to open //usr/lib/opkg/info/procd.list: No such file or directory.
 * opkg_conf_write_status_files: Can't open status file //usr/lib/opkg/status: No space left on device.

Am I correct on saying that it cannot update the opkg status file without enough free space, and as such refuses to remove the package files?
If so, is there a way I could get around this problem?

dnsmasq and firewall are (usually) part of the read-only part (squashfs) of the image anyways, so removing those will not free up any space (and actually need more space, to save the whiteout on the overlay). Recovering from out-of-space conditions might require firstboot or sysupgrade -n /tmp/<sysupgrade-image>, as jffs2 (as used on many devices) doesn't handle ENOSPACE gracefully.


I suppose I have no particular need to upgrade the packages in question, in any case. It might be advisable to just leave it as-is.

I think this is not wise... the next time you need to make any changes (even simple ones like changing the SSID or password), you may experience issues.

You may also experience other issues because of the package upgrade process...

Upgrading packages (via the CLI opkg upgrade command or the LuCI Upgrade... button) can result in major problems. It is generally highly discouraged, unless you know what you are doing or if there is specific instruction to do so.

1 Like

Would you recommend flashing a factory image, or an upgrade one to fix this?

Once OpenWrt is installed, always use syupgrade images to re-install or upgrade. The factory image is only for the first install to replace factory firmware.

It's generally not necessary to re-flash if firstboot works it will return to the same state as initially flashed.