There are cleaning chemicals in spray-cans, but as schmange says, its a temporary fix. Most control pots have an opening where the terminals come out from the resistive element inside. Dust gets in through that hole, and gets embedded into the track where the moving contact sweeps along the resistive element. Sometimes this crap can be dislodged and removed by cleaning spray, but there is always some permanent damage left behind. High-quality sealed pots with conductive plastic or ceramic (cermet) elements cost 3 or 4 times as much as those crappy open pots, which is why you don't see them in most guitars or gear.
So, you can spend $10 on a spray-can, or $5 on a replacement pot, both of which could be considered temporary fixes, or you can spend $20 on a good >Bourns< MIL-SPEC sealed pot that will outlive you. Choices.