Eliminate the attraction. The perfect environment for a cockroach is dirty and greasy with a lot of moisture. The kitchen is one place that contains all these elements. Give the kitchen a thorough cleaning on a regular basis. Be sure to include the area under the sink, kitchen cabinets and behind and underneath appliances such as the refrigerator and dishwasher. Try to keep the sink dry, store food in tightly sealed containers and do not leave pet food out for too long. Its also good to have a trash can with a tight lid. Lit up areas discourage cockroaches so you could consider leaving some lights on at night.
Other areas of the home are also attractive to cockroaches. They can be found in crawlspaces and bathrooms. Keep the bathroom as clean and dry as possible and fix dripping taps and leaking pipes as quickly as you can. If you notice any likely points of entry, seal them up.
What if the home already has a bad cockroach infestation? This should be taken care of by a professional pest control company who can effectively treat the problem. However, afterwards, place boric acid in areas with previous cockroach activity which will help to control them.