udev rules ignore_device

First, you are using a match key operator, i.e. == instead of an assign key operator: =.
Second, it's not an OPTION but an ENVIRONMENT variable: ENV{UDISKS_IGNORE}. Also, I'd use a higher number like 98-stm32.rules so as to prevent other rules overriding it.
That being said, the following rule should work (it does on my system):

ENV{ID_SERIAL}=="STM32_STM32_STLink-0:0", ENV{UDISKS_IGNORE}="1"

run:

udevadm control --reload

to reload rules.


  • ignore_device was removed with udev release 148. See release note or changelog

    If you noticed, all topics suggesting the use of it are old (~ 2009).

    A quick alternative is to use: ENV{UDISKS_PRESENTATION_HIDE}="1" for distribution with udisks, ENV{UDISKS_IGNORE}="1" for distributions which include udisks2.

    Reference: Archlinux Wiki: Udisks

  • Other possible solutions are using SYSFS. Either device/authorized , device/remove or driver/unbind.