How do I remove a library from the arduino environment?
Asked Answered
S

9

79

In the Arduino GUI on windows, if I click on Sketch --> Import Library, at the bottom of the menu there is a section called "Contributed".

Unfortunately, I had misclicked and added a library I did not want to that list.

How can I remove it from that list?

The help page only mentions that "If a sketch no longer needs a library, simply delete its #include statements from the top of your code" but it does not mention how to remove the library from the list of contributed libraries.

Suborbital answered 25/5, 2013 at 18:43 Comment(0)
A
91

Go to your Arduino documents directory; inside you will find a directory named "Libraries". The imported library directory will be there. Just delete it and restart the Arduino app.

Your Arduino library folder should look like this (on Windows):

  My Documents\Arduino\libraries\ArduinoParty\ArduinoParty.cpp
  My Documents\Arduino\libraries\ArduinoParty\ArduinoParty.h
  My Documents\Arduino\libraries\ArduinoParty\examples
  ....

or like this (on Mac and Linux):

  Documents/Arduino/libraries/ArduinoParty/ArduinoParty.cpp
  Documents/Arduino/libraries/ArduinoParty/ArduinoParty.h
  Documents/Arduino/libraries/ArduinoParty/examples

The only issue with unused libraries is the trivial amount of disk space they use. They aren't loaded automatically so don't take up any application memory of the Arduino IDE.

Achaea answered 25/5, 2013 at 22:36 Comment(2)
Libraries do not only claim disk space. They also claim a name. Thus no other library can use the same name unless the first library is removed. In addition the library will always show up in the pick list thus increasing the amount of time you need to pick any library. What I want to point out is that removing a library may have more reasons than conserving disk utilization.Tailwind
I didn't want to start a new topic on this but when I try this option, the library still exists. I am using the arduino IDE version 1.6.6. Any extra advice?Sherrer
R
27

Quote from official documentation as of August 2013:

User-created libraries as of version 0017 go in a subdirectory of your default sketch directory. For example, on OSX, the new directory would be ~/Documents/Arduino/libraries/. On Windows, it would be My Documents\Arduino\libraries\. To add your own library, create a new directory in the libraries directory with the name of your library. The folder should contain a C or C++ file with your code and a header file with your function and variable declarations. It will then appear in the Sketch | Import Library menu in the Arduino IDE.

To remove a library, stop the Arduino IDE and remove the library directory from the aforementioned location.

Ruella answered 7/8, 2013 at 13:40 Comment(0)
S
4

The answer is only valid if you have not changed the "Sketchbook Location" field in Preferences. So, first, you need to open the Arduino IDE and go to the menu

"File -> Preferences"

In the dialog, look at the field "Sketchbook Location" and open the corresponding folder. The "libraries" folder in inside.

Shawana answered 28/11, 2018 at 16:39 Comment(0)
U
2

I have found that from version 1.8.4 on, the libraries can be found in ~/Arduino/Libraries. Hope this helps anyone else.

Unstriped answered 24/7, 2018 at 11:49 Comment(0)
B
1

I had to look for them in C:\Users\Dell\AppData\Local\Arduino15\

I had to take help from the "date created" and "date modified" attributes to identify which libraries to delete.

But the names still show in the IDE... But it is something I can live with for now.

Bidwell answered 19/5, 2018 at 13:46 Comment(0)
P
1

For others who are looking to remove a built-in library, the route is to get into PackageContents -> Java -> libraries.

BUT : IT MAKES NO SENSE TO ELIMINATE LIBRARIES inside the app, they don't take space, don't have any influence on performance, and if you don't know what you are doing, you can harm the program. I did it because Arduino told me about libraries to update, showing then a board I don't have, and when saying ok it wanted to install a lot of new dependencies - I just felt forced to something I don't want, so I deinstalled that board.

Pulsar answered 3/8, 2020 at 2:53 Comment(1)
PD: I don't explain how to get into Package Contents, because if you not know how to get there, you better don't go there.Pulsar
M
1

In Elegoo Super Starter Kit, Part 2, Lesson 2.12, IR Receiver Module, I hit the problem that the lesson's IRremote library has a hard conflict with the built-in Arduino RobotIRremote library. I am using the Win10 IDE App, and it was non-trivial to "move the RobotIRremote" folder like the pre-Win10 instructions said. The built-in Libraries are saved at a path like: C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.42.0_x86__mdqgnx93n4wtt\libraries You won't be able to see WindowsApps unless you show hidden files, and you can't do anything in that folder structure until you are the owner. Carefully follow these directions to make that happen: https://www.youtube.com/watch?v=PmrOzBDZTzw
After hours of frustration, the process above finally resulted in success for me. Elegoo gets an F+ for modern instructions on this lesson.

Malpighi answered 5/8, 2020 at 22:58 Comment(0)
S
1

My solution is low-tech but effective so I want to share:

create a folder for disabled libraries next to libraries

move libraries here to disable, swap back in to re-enable

Skater answered 10/3, 2022 at 4:32 Comment(0)
H
0

as of 1.8.X IDE C:\Users***\Documents\Arduino\Libraries\

Hollo answered 27/12, 2020 at 7:50 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.