You start an update and it fails. The log mentions insufficient space, or the router downloads but never installs, or it reboots and comes back on the old version as if nothing happened. You get the same picture when installing an extra package or uploading a file.
What it is not: this is not broken flash, and usually not a broken download either. It is arithmetic. A MikroTik has to put the new package down first, then unpack and install it, and during that operation it needs more room than the file is big. On a device with 16 MB of storage that gets tight quickly.
There is a second kind of "no space" in here as well: too little memory. A board with 32 or 64 MB of RAM can start an upgrade and stop halfway because working memory ran out, while the flash still had room to spare. So always look at both numbers.
The quick checks, in order
- How much is really free?
/system resource print. A good answer:free-hdd-spacecomfortably above the size of the package you want, andfree-memoryof a few megabytes or more. Less than a megabyte free is your answer. - What is lying around?
/file print. A good answer: a short list. Old.npkfiles, backups, exports, log files or container layers tell you where the room went. - Which packages are installed?
/system package print. A good answer: only what you use. An unusedwireless,container,upsorzerotiercosts space and gives nothing back. - How big is the update?
/system package update check-for-updates. A good answer: a version number and a channel. Now you know how much to free up. - Is there external storage?
/disk print. A good answer: a USB stick or NVMe you can use for containers and log files, so the internal flash stays empty. - Is something writing to the flash?
/system logging action printand/system scheduler print. A good answer: no logging action withtarget=diskthat you do not recognise, and no job leaving a file behind every day.
The usual causes, most common first
Old installation files were never removed
If you ever uploaded an .npk by hand, it is probably still there. Remove them with /file remove [find name~"\\.npk"]. This is the quickest win and also the safest one.
Packages you do not use
A device carrying both wireless and wifi holds two wifi stacks while only one can be active. Remove with /system package uninstall and reboot. Check which stack your configuration uses first, see Packages.
Log files on the flash
Logging to disk is pleasant when you have to look something up, and it costs room that does not come back on its own. Switch it off, or lower the number of files, when the flash is tight.
Containers on internal storage
A container image is easily tens of megabytes and the layers stay put. On internal NAND that is not only too large, it also wears the memory out. Containers belong on a USB stick or NVMe.
The board is simply small
A hAP lite or hEX lite has little memory and little flash. RouterOS v7 fits on it, and with that the room is gone. Clearing space helps here up to a point and then no further.
Upgrading in two steps
If you have too little room to download and install, use netinstall. It writes the device from scratch and needs no free space to do it. Make an export first, because everything goes. See Netinstall.
What the configurator does about it
- On a device the catalogue knows has 64 MB of memory or less, the tool says so straight away: RouterOS v7 runs on it, but there is not much room, keep the configuration small, do not install packages you are not using, and check what is left with
/system resource printafter applying it. - In System you pick the RouterOS version the script is written for and the update channel. The Automatic updates toggle creates a script and a scheduler that checks and installs every Sunday at 04:00. That reboots the router. On a tight device that is exactly the moment you want to know whether there was room, so leave it off on such a board.
- The Containers section says in its own introduction that you should use external storage as root-dir, because NAND wears out. The Storage field defaults to
disk1, so a disk and not the internal flash. - Turn the weekly backup on in Services & tools and the scheduler writes a
.backupand an.rscnamed after the router every week. They overwrite themselves, so they do not grow, but there are always two of them sitting there. - Pick logging to flash and the script creates five files of a thousand lines. That is deliberately bounded, but it is not nothing on 16 MB.
- What the tool does not do: it does not know how much space is free on your device. The tool runs in your browser and never talks to the router. It can warn you on the strength of the model, not on the strength of reality. Look yourself with
/system resource printbefore you install anything.
Where the cause lies outside your router
- The download. If the router cannot reach MikroTik's download server, the update fails with a different error than lack of space. Check DNS and the outbound firewall.
- The channel. On
testingyou get packages that can be larger or less stable. On a small devicelong-termis often the calmest choice. - The USB port. A stick the router does not see gives an empty
/disk print. Try another one; not every stick works on every model.
Read on: Packages, System and time and Containers.