A RouterOS v7 global function script for staging a specific RouterOS version (upgrade or downgrade) by downloading the main package and all currently enabled extra packages (e.g., ups) as local .npk files.
Ideal for controlled upgrades/downgrades to specific versions, not just latest. Supports feature preservation and provides contextual next-steps (reboot for upgrades; /system package downgrade for downgrades).
- Individual .npk downloads for main + extras (direct from MikroTik servers)
- Detailed per-package CLI output and accurate staging status
- Contextual guidance: upgrade vs downgrade instructions
- RouterOS >= v7.14.3
- Outbound HTTPS access to download.mikrotik.com (port 443)
-
Fetch def-rosDownload.rsc from GitHub
/tool fetch url="https://raw.githubusercontent.com/seancrites/def-rosDownload/refs/heads/master/def-rosDownload.rsc" mode=https dst-path="def-rosDownload.rsc" output=file -
Load the file as a script
/system script add name=def-rosDownload source=[:file get def-rosDownload.rsc contents] -
Run script to load global function
/system script run def-rosDownload -
Verify function registration
/system script environment print where name=rosDownload -
Make persistent on boot:
/system scheduler add name="load-rosDownload" interval=0 \ on-event="/system script run def-rosDownload" start-time=startup
-
Use:
-
Upgrade:
$rosDownload 7.20.1 -
Downgrade:
$rosDownload 7.18.1 -
LTS downgrade:
$rosDownload 6.49.10
- Upgrade:
/system reboot - Downgrade:
/system package downgrade(confirm prompt → auto-reboot)
- Always export config (
/export file=config-backup) before staging. - In HA setups (VRRP clusters), stage on standby unit first.
- Rare unavailable extras (architecture-specific): Manual upload from "Extra packages" ZIP if needed.
- Monitor:
/log print where message~"rosDownload"|/file print detail where name~"\.npk$"
This project is licensed under the BSD 3-Clause License. See the LICENSE file for details.
- Sean Crites (sean.crites@gmail.com)
December 2025