If all files you want to delete has pattern like master-YYYY*, you can use those patterns:
rm -rf master-???[0-79]*
rm -rf master-??[02-9]*
rm -rf master-?[1-9]*
rm -rf master-[013-9]*
The goal is to ommit digits from a year number, so on first place after master- we need to ommit (don't remove) digit 2, on 2nd place digit 0, on 3rd place digit 1, and on 4th place - digit 8
I tried it just a minute before, and is enough to run only first two of them.
You can move master-2018 to another dir, e.g. /tmp,
then remove everything with master-*, and move back your master-2018 from tmp.
mv -r master-2018* /tmp/backup
rm -rf master-*
mv -r /tmp/backup/* .