Skunks can be deterred by ammonia, which can be placed in pie pans and left around problem areas. Another deterrent is a solution made by boiling chopped onions, chopped jalapeno peppers and a tablespoon of cayenne pepper in 2 quarts of water. Pellets of synthetic fox urine can also work.
No deterrent works on every animal, so removing attractants is also important. Skunks are attracted to food sources, such as places where pets are fed outside, open-air compost heaps, poorly secured garbage cans and trees and shrubs that produce fruits, nuts or berries. Skunks are also more likely to leave if they cannot find shelter or water easily.