The esp32 can do bluetooth scans, however, only past 2018 as this was a later addition to the platform.
I created a fresh install and followed the esp32 download guides that you find on google, this is where I got the idf from. I later found that I can download and install esp-arduino as a library instead and this gives me access to a much later version of the idf. However, because I already have the idf installed via the automated arduino install, arduino ignores the newer idf thats in the documents/arduino folder.
The question I have is, how do I uninstall the esp32 board in arduino ( i think this deletes the idf ). How do I uninstall the 1.0.6 IDF? And is there a way for me to select?
I don't see anything at that link about installing a library. That is about installing an Arduino boards platform.
Please post the output that indicates this to you. It's not clear to me what is happening because the release notes for the latest release of the ESP32 platform say:
based on the latest development version of ESP-IDF
So I would not expect that it was necessary to do any sort of manual installation to get the latest ESP-IDF if you have the latest release version of the ESP32 Arduino boards platform installed
The key to having two copies of the same platform installed at the same time is that you need to make them unique as far as the Arduino IDE is concerned. The machine identification of a platform is via the vendor name and architecture name. In the case of the ESP32 platform, the standard vendor name is esp32 and the architecture name is esp32 (there is no significance to the fact that the vendor and architecture strings happen to be identical).
The vendor and architecture names of a manual boards platform installation are determined by the installation folder names. So if you have an installation folder structure like this:
<sketchbook folder>
|_ hardware
|_ esp32
|_ esp32
then the platform ID is esp32:esp32. This will collide with the boards platform with the same ID that is installed via Boards Manager to your Arduino15/packages folder. The architecture name is used for things like determining which library to use, so you should not modify the architecture folder name, but the vendor name is just an arbitrary string. So this is the mechanism for differentiating a manual platform installation from the same platform installed via Boards Manager. You could do something like this:
which will cause the platform ID to be esp32-development:esp32. After doing that, restart the ARduino IDE. You will now find two entries for ESP32 under the Tools > Board menu. If you are using a modern version of the Arduino IDE, one of them will have the suffix "(in sketchbook)". So you can now choose which of the two platforms you want to use!