A retaining device for retaining a small-sized detective sensor includes a flexible rubber body. The flexible rubber body includes a first retaining portion, a first connecting portion, a main body portion, a second connecting portion, and a second retaining portion which are connected in sequence. An inner side of the first retaining portion and an inner side of the second retaining portion are provided with primary Velcro retaining straps. An inner side of the main body portion is formed with a recess for installing the small-sized detective sensor.