Food, water, and shelter attract cockroaches. Keep your home clean, store food in sealed containers, and repair leaks.