Where do libraries go?

Hello all:

I am new to Arduino but not to programming. I downloaded a project from github and want to modify it. I got it to compile originally, but when I went to modify it, I changed the name of both the .ino file and the folder it's in. The Arduino IDE continues to use the 'libraries' folder under the old name and because one of the libraries is lvgl which seems to have a non-standard install (requires manual intervention after installing with the library manager), and another library is manually installed, everything breaks.

I thought I would start again completely clean, with a new project, new name, and new everything, but the IDE still decided to use the old folder and its 'libraries' sub-folder. Then I deleted the Arduino app and reinstalled it, but it picks right up where I left off. I'm sorry I ever tried to change the name of the project.

Please help me understand how the IDE chooses where to put libraries? I thought it was just in the project folder, but it appears to be more complicated than that. Or if nobody has a good overview of how this works, maybe help me understand how I can erase the current state and start from scratch?

Thank you,

-Tom

Look in.

They go in a folder named libraries in your (local, not cloud) sketchbook. (Although your personal files may be mapped to a folder in the cloud, like iCloud or OneDrive.) Your sketchbook location is a setting in File | Preferences.

That libraries is then a sibling of sketches you put at the root of your sketchbook, the default behavior. But you can have a complex tree. You just have to have an .ino file with the same name as the folder that contains it to be a valid sketch. You should not nest sketches.

Thank you. I think it was the location of the sketchbook as a preference that threw me. Not sure I understand why that's there, but you can bet I'll never forget it now.

The mac version isn't "File | Preferences", incidentally, but it's under "Settings" in the application menu.