If the dog's glands have become impacted, you can clean them out. If your dog's glands look swollen and they have visible discomfort and pain, you can apply a warm compress to relieve the swelling and aid with the pain. You can apply the compress up to several times a day, as you deem necessary. Helpful tips and remedies for dogs with anal gland problems. Learn which product worked the best for our own dogs.