Treatment of anal gland problems involves relieving the pressure in the gland in the short term, before addressing the underlying cause to prevent further issues. Expression of the glands by a vet or registered veterinary nurse can relieve pressure, and the material that is expressed can tell your vet whether it is normal or infected fluid.
Anal gland abscesses can be treated with expression, but will likely also need a course of anti-inflammatories and vet rechecks to make sure the issue has resolved. Antibiotics are not considered necessary for most anal gland problems, including abscesses, but recurrent problems may need a short course. Sometimes antibiotics are instilled directly into the anal gland with the dog under sedation.
Removal of the anal glands is rarely done unless there is a serious underlying cause such as an anal gland tumour. This is because it is a risky surgery that carries a real risk of ongoing incontinence problems.