How do I remove a sliding glass shower door that is riveted in?

I’m remodeling a house with nasty, gross sliding glass shower/ bathtub doors. I have removed the doors, but the rails are held with rivets, not screws. What is the best way to remove the rivets to get the rails off without damaging the tiling or tub?