managing configuration via outside software

Here’s my situation:
I currently have a software that manages our linux routers(iptables, QoS, dhcp, arp, etc. Basically it works, by deleting old configuration files, uploading new ones, and executing few things with ssh.

I need to make it work with RouterOS. The thing i’m currently stuck with, is that i haven’t figured out a way to delete for example ALL firewall forwarding rules( or any other part of a conf), because i don’t know how many entries there are…

Any suggestions?

remove [f]

that should do it.