During the second phase (rear 1/2) of bed-lining the exterior of my truck, I decided it was time to pull the bed rail caps.
We are bed-lining our ENTIRE truck, not just the bed. Since we're going to be using spray-on bed-liner (Monstaliner), the caps aren't important to protect against damage.
If you are just bed-lining the inside of the bed, I would NOT remove the caps.
You will probably destroy them, and there are dozens of holes underneath them. I'll be filling mine somehow, because I'm a fool, but I've heard replacement caps are expensive.
Nevertheless, if you're dying to remove your plastic caps, there are clips underneath that can be squeezed with pliers to release them. HOWEVER, not all the clips can be accessed, so some require a bit of prying. If you pull directly on the plastic, it will fold over and break. If you pull too close to the clips, you may tear the clips right out of the caps (see photo). Lastly, if you yank too hard, you'll bend the sheet metal in the rails (see photo).
The best bet is a long pry bar that you can slide under the caps, and get close to the clips. Good luck, if you goof it up, you'll be left with this!