If you ever find yourself in need of trimming out the start or end of a GIF, the imagemagick tools can do the job.

  1. First, check how many frames are in the GIF with identify filename.gif
  2. Trim frames with convert filename.gif[0-100] trimmed.gif

The [0-100] is the range of frames that must be kept. Replace the upper bound of 100 by number of frames mentioned in the output of the identify command.