While some herb plants have a natural resistance to garden pests, it doesn't prevent all insect attacks. Pests can damage your plants and stop them from producing. Since herb leaves are generally delicate, getting rid of pests is best done with gentle insecticides.
Kill thrips, spider mites, fungus gnats, aphids and ants with insecticidal soap. Spray the plant and any insects trailing away from the plant with the soap every few days until the insects are gone.
Use insecticidal oil for mealybugs. These pests repel insecticidal soap, but insecticidal oil will suffocate them. Use it once a week until the insects have disappeared.
Use rubbing alcohol to kill hard-bodied insects that aren't eradicated by soap or oil. Apply rubbing alcohol sparingly. It is not safe for consumption.
Remove the top layer of soil and replace it with fresh soil if larvae or more insects continue to appear. Getting rid of the soil should remove the eggs from your plant before they have time to hatch.
Spray especially fragile herbs, such as basil, with a gentle stream of water before using any other treatment. This may remove flying bugs like gnats and whiteflies.
Pick off slugs and snails from your herb plants by hand at night. If that doesn't work, use diatomaceous earth or a copper snail barrier.