Assuming you're talking about the older style hard rubber grips with the finger grooves that look like this:
I hope you're strong because this will be the hardest thing you do all day. There is a deep groove at the top of the aluminum part behind the rubber where a lip on the rubber part seats into to prevent it from sliding off, which makes them very difficult to remove. The best way I've found to remove it is to;
- leave the foregrip bolted securely to the rail but remove all other parts
- place the rail upside down on carpet so that the foregrip is pointing up
- place your foot on top of the rail close to the foregrip
- grasp the rubber grip and pull as hard as you can for as long as it takes
- don't throw your back out