Bulk erase files

Hi,

We have a bit of a situation with a 751 running 5.14. Seems that there’s no memory left in the unit, and we can’t get any files to list so we can delete. Is there a quick script or command we can run to remove anything starting with export or backup? I’ve tried the filter in winbox, but that won’t list any files. The terminal/ssh won’t display the list of files either.

TIA,

Carlos.

/file remove [find name~“^export”]
/file remove [find name~“^backup”]

Skot - Thanks for the code. However, it seems to be stuck. Been running that for a few minutes, and nothing shows up other than a blinking cursor. I don’t know if the unit is locked up because all the file memory is in use. It states 61.4 of 61.4MB used. Should I attempt to reboot the unit?

The message returned after about 10 minutes was:

action timed out - try again, if error continues contact MikroTik support and send
 a supout file (13)

Thanks again,
Carlos.

Yes, see if a reboot helps.

Once all the storage space is used, sometimes there is nothing you can do except netinstall… and then make sure in the future not to let it fill up.

Thanks for the help. A reboot seems to be what it needed. Immediately after reboot, it had almost 20MB free space. Was then able to upgrade to 6.4 without any issues.

Thanks.
Carlos.