In the Mediterranean area, the major pest is the carob moth, Myelois ceratoniae. It lays eggs on the flowers or newly-formed pods and the larvae bore into the pods and ruin them. The larvae of a midge, Asphondylia gennadii, cause stunting of the pods. Some of the best cultivars are resistant to these pests. A beetle, Cerambyx velutinus, may bore holes in the trunk.
Rats climb the trees, hide among the branches, gnaw the bark until the branches die.
Such branches are pruned out twice a year. The only pests reported as attacking carob trees in California are scale insects, including the red scale. Ground squirrels feed on plants under 2 years of age. Pocket gophers are very fond of carob roots, and rabbits and deer graze on the young trees. Diseases are few.