all the official Arduino boards show up twice in Boards Manager

For some reason I see all the official Arduino boards listed twice in Boards Manager.
Under those I have other unofficial boards like STM32 and ESP but those only show up once as they should.
Has anyone else seem this happen? How can I change this?

Try this:

  • File > Preferences
  • Note the current setting of the "Sketchbook location" preference.
  • Change the "Sketchbook location" preference to point to any other folder on your computer.
  • Click the "OK" button.
  • Close all Arduino IDE windows.
  • Restart the Arduino IDE.

After doing that, do you still see the duplicate boards under the Tools > Board menu? If not, this means you have an extra copy of Arduino AVR Boards (or some 3rd party derivative of it) installed at {sketchbook folder}/hardware, where {sketchbook folder} is the sketchbook location from before you changed that preference.

Since you didn't know where these boards came from, it's likely you have no use for the duplicate copy of Arduino AVR Boards. In that case, you can simply delete it. If you do have a use for it, then the duplicate boards are there for some purpose (I couldn't say what that purpose might be without more information) and you'll have to get used to having duplicate boards.

This situation will be improved on the release of Arduino IDE 1.8.13, which puts each platform in a separate submenu and notes which ones are installed to the sketchbook:

Even on a 32 inch screen is is a little hard to discern.
Could you crop the crud and re-post.

It's a small bug in the Arduino IDE. No problem, both the copies of the boards work as they are meant to.

..Arnav

ArnavPawarAA:
It's a small bug in the Arduino IDE.

I'm not familiar with this bug. Do you have a reference to more information? Can you provide the set of steps necessary to reproduce it?

The boards.txt file might be bugged, causing to all the board references to get duplicated.
It can be caused by clicking something multiple times before it gets time to load in the boards manager. It's not any problem, because both the copies of one board will work fine.

..Arnav

pert:
Try this:

  • File > Preferences
  • Note the current setting of the “Sketchbook location” preference.
  • Change the “Sketchbook location” preference to point to any other folder on your computer.
  • Click the “OK” button.
  • Close all Arduino IDE windows.
  • Restart the Arduino IDE.

After doing that, do you still see the duplicate boards under the Tools > Board menu? If not, this means you have an extra copy of Arduino AVR Boards (or some 3rd party derivative of it) installed at {sketchbook folder}/hardware, where {sketchbook folder} is the sketchbook location from before you changed that preference.

It didn’t change anything but make the IDE take a VERY long time to start so I switched it back to the way it was.

I checked in C:\Users\dentaku\Documents\Arduino\hardware and there’s nothing in there.

This error indicates something has gone wrong with a hardware package installed via Boards Manager. The solution is to remove the installed packages. Be aware this will remove any boards you have installed via Boards Manager:

  • (In the Arduino IDE) File > Preferences
  • Click the link on the line following “More preferences can be edited directly in the file”. This will open the Arduino15 (or similar name depending on OS) folder.
  • Delete the packages folder. Please be very careful when deleting things from your computer. When in doubt, back up!
  • Restart the Arduino IDE

Does the problem still occur?

ArnavPawarAA:
The boards.txt file might be bugged, causing to all the board references to get duplicated.
It can be caused by clicking something multiple times before it gets time to load in the boards manager. It's not any problem, because both the copies of one board will work fine.

..Arnav

I just looked through a bunch of boards.txt files and the one in "C:\Users\dentaku\AppData\Local\Arduino15\packages\arduino\hardware\sam\1.6.12\boards.txt" has all the official Arduino boards listed in it. Maybe that's the culprit. I don't have any samd arduinos either so I'm not sure why I even have that installed.

pert:
This error indicates something has gone wrong with a hardware package installed via Boards Manager. The solution is to remove the installed packages. Be aware this will remove any boards you have installed via Boards Manager:

  • (In the Arduino IDE) File > Preferences
  • Click the link on the line following "More preferences can be edited directly in the file". This will open the Arduino15 (or similar name depending on OS) folder.
  • Delete the packages folder. Please be very careful when deleting things from your computer. When in doubt, back up!
  • Restart the Arduino IDE

Does the problem still occur?

I just moved the entire C:\Users\dentaku\AppData\Local\Arduino15\packages\arduino\hardware\sam folder to my desktop folder (probably while you were typing the previous reply) to hide it from the IDE and now I don't have any duplicates.

dentaku:
now I don't have any duplicates.

I'm glad to hear it!

dentaku:
"C:\Users\dentaku\AppData\Local\Arduino15\packages\arduino\hardware\sam\1.6.12\boards.txt" has all the official Arduino boards listed in it. Maybe that's the culprit. I don't have any samd arduinos either so I'm not sure why I even have that installed.

That's the boards.txt for Arduino SAM Boards, not Arduino SAMD Boards. That file should only contain the board definitions for the Arduino Due:

It definitely should not have any other board definitions in it.

pert:
I'm glad to hear it!
That's the boards.txt for Arduino SAM Boards, not Arduino SAMD Boards. That file should only contain the board definitions for the Arduino Due:
ArduinoCore-sam/boards.txt at master · arduino/ArduinoCore-sam · GitHub

It definitely should not have any other board definitions in it.

Great. I replaced the boards.txt file with the one you linked to and put the sam folder back where it was and everything looks normal.

To update my situation. I guess replacing the boards.txt file with the one in ArduinoCore-sam/boards.txt at master · arduino/ArduinoCore-sam · GitHub didn't work because I get an error about that file whenever I try to upload code to ANY arduino.
I renamed the file so the IDE can't see it anymore and it made the error go away.
I don't have a DUE so it doesn't matter.