For oil based lubes, use talc powder, reapply and vacuum. continue doing so until the oily stain is pretty much gone. Then go back over it with shampoo on a rag until you feel the oil is removed completely. Rinse well until no suds come out. Try baking powder in place of talc and do the steps above for silicone lube. For water based, shampoo with carpet shampooer or do the soap and water until gone.
I re-use my good pump bottles for lubes if they leak even a little....saves damaging the carpet, nightstand, toy trunk and other toys or my overnight pack.