Baking soda can be effective in killing carpet beetles and their larvae - as long as it comes in direct contact with them. It works great as dries them out. Make sure you also remove infested items, vacuum, and seal cracks and crevices so they don't cause more problems in the future.