It looks like you can't do this currently but there is a request in Tracker for this change: MDL-66789 which you can vote for.
Installing and upgrading help
Pin Moodle to LTS version
This discussion has been locked so you can no longer reply to it.