Default sketch on startup

I tracked down one solution here:

I'll provide more detailed instructions you can follow to disable the sketch restoration behavior of Arduino IDE 1.x:

  1. Select File > Preferences... (or Arduino > Settings... for macOS users) from the Arduino IDE menus.
    The "Preferences" dialog will open.
  2. Click the link on the line following "More preferences can be edited directly in the file" in the "Preferences" dialog.
    This will open a folder in your file manager.
  3. Switch back to the Arduino IDE window.
  4. Select File > Quit (or Arduino > Quit Arduino for macOS users) from the Arduino IDE menus.
    All Arduino IDE windows will close.
    Arduino IDE overwrites the preferences file on exit, so it is necessary to exit Arduino IDE before manually editing preferences so that the IDE won't overwrite your changes.
  5. Switch back to the file manager window.
  6. Use any text editor to open the preferences.txt file you find in that folder.
  7. Change the line that looks something like this:
    last.sketch.count=1
    
    to this:
    last.sketch.count=1
    
  8. Change the line that looks like this:
    preferences.readonly=false
    
    to this:
    preferences.readonly=true
    
  9. Save the file.

Please note that this makes it so that Arduino IDE can't save any preferences, so it will forget any changes you make to the preferences every time you exit the IDE. It also won't remember the selections from the Tools > Board, Tools > Port, Tools > Programmer, etc. menus you had selected during the previous session. And it won't update the File > Open Recent menu. So I'm not sure the benefits outweigh the disadvantages.

Another approach is described earlier in that topic:

Although this will require adjusting the invocation used to start Arduino IDE (similar to the solution I mentioned in post #2, it doesn't impact the usability of the IDE.