If you find that earwigs are indeed the culprits, you can trap them using rolled-up newspapers. This sometimes works quite well because of the earwig's habit of crawling into small places to hide. Each day, shake the insects from the rolled paper into a bucket of soapy water to kill them. Place several around the garden and empty periodically. Use of insecticidal soap is another method of controlling them that is relatively safe for both humans, pets, and the environment.
Insecticidal soap is similar to regular soap except it is highly refined.
The formulation that contains pyrethrum is most effective for earwigs, but it must come in direct contact with them, so spray it directly on the insects. Soap that does not come in direct contact with the insect will have no effect, nor does it leave residues that will control insects. Read and follow all label instructions when using any insecticide. Indoors To manage earwigs that find their way indoors, vacuuming them up can be sufficient for the occasional invader. If earwigs are more numerous or if they are a chronic problem, caulking cracks around doors and windows can help keep them outdoors, and use of weather stripping or brush strips under doors and screen doors can help.