Almost every wall-mounted towel rack you find on hardware store shelves comes with mounting brackets that get screwed to the wall and are hidden under the posts that hold the rack. The setscrews holding the posts to the brackets are hidden on the undersides of the posts, so they aren't immediately visible, giving the impression that the posts are permanently attached to the wall. Fortunately, they aren't, and removing them is even easier than installing them. Some racks are designed to be glued to tile walls, and removing these is also easy, taking only a bit more effort.
Look for the Setscrew
If you want to remove a standard metal towel bar from a wall covered with drywall or tile, the first thing to do is look at the underside of one of the posts to determine what kind of tool you need to remove the setscrew. Most towel racks have hex screws that you remove with a 1/8-inch hex key, but some have small Phillips screws for which you need a No. 1 Phillips screwdriver.
Video of the Day
With the right tool in hand, unscrew the setscrew from one of the posts to release it from the wall bracket; then keep one hand on the towel rack to prevent it from falling while you lift off the post. Set the post and rack aside; then remove the post from the other bracket. Finally, unscrew and remove the wall brackets, using a drill and a No. 2 Phillips bit.
Patch the Holes
If the bathroom walls are drywall, patching the holes left by the towel rack brackets is easy. You can even do it with toothpaste, although the proper way to make the repair is to use spackling compound or drywall joint compound. Use a putty knife to push the repair compound into the holes. Then scrape off the excess and wait for the compound to dry. Finish off by sanding and touching up with the wall paint.
Patching holes in ceramic tile is a little trickier, because you need a compound that is harder and glossier and that more closely resembles ceramic. Any type of two-part epoxy resin will do the job, and you may be able to find one that has a matching color. If you can't find one, don't worry — just touch up a noticeable repair with an enamel paint that matches the tile color. If the holes are in the tile grout, patch them with grout of the same color.
Removing a Glued-On Towel Rack
If your towel rack is glued to the tile wall, you have to break through the glue bond holding each post to the tile. Although you can do this with an oscillating tool, it's safer to do it manually with a putty knife and a hammer to minimize damage to the wall tiles.
Start by cutting through any caulk in the joint between the post and the wall using a utility knife. Then tap the putty knife behind the post and keep tapping until the post separates. You may have to tap in several places around the post to completely disengage it, so watch your fingers, and wear goggles to protect your eyes from flying debris. When the post is gone, use your putty knife to scrape off residual adhesive.