To prevent an infestation, deprive roaches of their needs: food, moisture, and hiding places. Put all food in the refrigerator or in metal, glass, or plastic containers. Keep counters, shelves, and floors immaculate. Fix leaky plumbing; wring out and dry sponges and dish towels.
Caulk openings around pipes, appliance connections, and cabinets. Clean under low furniture and appliances.
If an infestation does occur, take these steps simultaneously: 1. puff boric acid powder into wall openings and under low equipment; 2. after removing all food and utensils, spray suspected hiding places and paths with a household formulation of malathion, chlorpyrifos, or diazinon or with a commercial roach spray.
Caution: Do not treat food preparation areas with any pesticide or poison.
Line shelves with fresh shelf paper after the spray has dried (usually 4 hours). Repeat the procedure 2 to 4 weeks later when a new generation will have hatched.
In an apartment building, you can rid your unit of roaches, but they will return unless all units and hallways are treated simultaneously, preferably by a professional exterminator.