There is an existing mechanism for hiding boards, though it's not super user friendly:
- In the root folder (the one that contains boards.txt) of each of the hardware packages that have boards you want to hide, create a file named boards.local.txt.
- Open boards.local.txt in a text editor.
- For each board you want to hide, add an empty hide property. For example, if I wanted to hide the Arduino/Genuino Uno board, I would add this line: uno.hide=
- Save the file.
- Restart the Arduino IDE if it's running.
The easiest way to find the active hardware package location is as follows:
- Select a board from the hardware package from the Tools > Board menu
- File > Examples > SPI > BarometricPressureSensor (or any other SPI example sketch)
- Sketch > Show Sketch Folder
- Move up folder levels until you reach the one that contains boards.txt
Note that every time you update to a new version of any of the hardware packages, your boards.local.txt will be lost. For this reason, you should save those files somewhere safe so that they can easily be replaced after each update. This is the reason for using boards.local.txt instead of editing boards.txt directly, otherwise you would need to merge your changes with whatever changes were made to boards.txt via the update.
There is an existing feature request for what you want:
https://github.com/arduino/Arduino/issues/6034Nothing has been done about that, but there is some brand new work just this week by one of the Arduino developers to add a recently used boards list at the top of the Tools > Board menu. That's not really what you're asking for, but it will be helpful for dealing with the overly long
Tools > Boards menus we end up with after installing a lot of hardware packages. There are test builds available in the pull request thread if you want to try it out:
https://github.com/arduino/Arduino/pull/8607