Exclude a library from 'Updates Available'?'

For the time being, maybe forever, I do not want to update a particular (buggy) library. Is it possible to avoid the frequent messages I get to do so? I'd estimate that 95% of them prove to be for that single library.

Treat your selected libraries like a library in your sketch folder... move the static library out of ./libraries and into another folder, "delete" from the IDE library manager, then reference the static libraries with double-quotes/path, rather than greater-than/less-than (standard library locations). Hope there are no dependencies.

I never updated IDE and libraries just because there is a new version available. Only if the old version has a bug or become incompatible with other libraries.

2 Likes

You can prevent the IDE from warning you that updates are available using the option marked in red in file → preferences.

Like @b707, I hardly ever update libraries.

I think the approach described by @xfpd of bundling a library with a sketch when that sketch must be used with a specific version of the library is reasonable.

In case you don't want to do that, I can provide a workaround:

  1. Select Arduino IDE > Settings... from the Arduino IDE menus.
    The "Preferences" dialog will open.
  2. Take note of the path shown in the Sketchbook location" field of the dialog.
  3. Click the "CANCEL" button.
    The "Preferences" dialog will close.
  4. Use any text editor to open the file at the following location:
    <Sketchbook location>/libraries/<library name>/library.properties
    
    (where <Sketchbook location> is the path from the Sketchbook location" preference and <library name> is the name of the library)
  5. Change the line in the file that looks like this:
    version=1.2.3
    
    to this:
    #version=1.2.3
    # Artificial version set to prevent update offers:
    version=999.0.0
    
  6. Save the file.

This will cause Arduino IDE to always think you have the newest available version of the library already installed.

The added lines that start with # are comments that don't have any technical significance, but serve to document the modification made to the file in case you forget you did that (or the true version of the installed library) later.

1 Like

Although that means remaining unaware of all updates (boards and libraries).

Thanks, looks like that's the optimum solution in my case.

I've shown the amended Properties file below. I'm puzzled why the original version seemed to imply version 1.0.0 was 'current'? I'm using 1.0.5 to avoid 1.0.6.

name=DFPlayerMini
#version=1.0.0
# Artificial version set to prevent update offers:
version=999.0.0
author=Arsen Torbarina <jonniezg@gmail.com>
maintainer=Arsen Torbarina <jonniezg@gmail.com>
sentence=A reliable, responsive and compact driver for DFPlayer Mini sound module for Arduino.
paragraph=It guarantees stability and responsiveness, due to respecting the two-way communication protocol with the module, taking care of required wait cycles, and letting you do your own stuff while waiting. It does not require interrupts or multithreading, because if you use the whileBusyMethod callback wisely, you will be able to achieve great responsiveness.
category=Device Control
url=https://github.com/jonnieZG/DFPlayerMini
architectures=*


Indeed. But also be aware that updating a board package or library might break existing code that you wrote a while ago. You will be blissfully unaware of that when you need to work again on that old project and suddenly it does not compile. I have had hassles with the ESP8266 board package where I accidentally upgraded and could not remember the old version.

If it ain't broke, don't fix it.

Thanks, I'll try @ptillisch 's method first.

Looks like I'm unusual in accepting updates on trust?

I take same approach with software; I want latest features and bug fixes. If I get negative consequences likely to be due to the update, I'll revert.

This particular library was decribed in my post:
https://forum.arduino.cc/t/dfr-mini-player-library-bugs/1218680

Your IDE looks ?1.8?... IDE 2.x removes that selectable feature.

You are welcome.

Based on the information in the post you linked to, I think you modified the wrong library:

If you check the library.properties in the library repository you linked in that post, you will see the name is DFRobotDFPlayerMini:

But in the library.properties file you shared here, the name is DFPlayerMini:

It is still available, but now in the advanced settings. In case you are interested in knowing the equivalent procedure for disabling update offers in Arduino IDE 2.x, here it is:

  1. Press the Ctrl+Shift+P keyboard shortcut (Command+Shift+P for macOS users) to open the "Command Palette".
    A menu will appear on the editor toolbar:
  2. Select the "Preferences: Open Settings (UI)" command from the menu.
    You can scroll down through the list of commands to find it or type the name in the field.
    A "Preferences" tab will open in the Arduino IDE main panel.
  3. Type arduino.checkForUpdates in the "Search Settings" field of the "Preferences" tab.
  4. Uncheck the box under the "Arduino: Check For Updates" setting.
  5. Close the Preferences tab by clicking its X icon.
2 Likes

Duh, you're right, duly corrected. Thanks for the heads up.

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.