Yep! DE does work (I use it myself), but if using it in a home be sure to get "food grade". Other types may have additives that aren't good for you. Don't just go to your local garden center, shop online for a retailer nearby or buy online. Never buy the DE that's used for pools and then use it in your home - it's really bad for you!
The way DE works is twofold. First, it's hydrophilic - sucks moisture right up. So you won't be attracting pest insects to your cabinets in the first place. Second, the tiny diatom corpses are made of silica, and they cut up the waxy coating that protects insects and holds moisture in. So an insect running across some DE loses its protection and gets dried out at the same time. DE takes a while to work, because it isn't a poison. In fact, DE isn't toxic, so it's good for people who are chemically sensitive, pet beds, and the like. If you're avoiding poisons, or want to practice integrated pest management, it's a good tool.