How do you get the tracks for a sliding glass door clean?

My glass door doesn’t slide very easily and my mom says its because it’s dirty – which it is. It’s disgusting. It’s right next to carpeting, which makes it a bit of a hassle to clean, because I don’t want to ruin the carpet on accident. I am willing to get the carpet soaked if need be, but it’ll take me a while to dry afterwords so I prefer to avoid it if possible