Software for cutting GIF?

Is there a software from the official repositories that can cut GIFs? For example, if given a GIF that runs for 20s, the software should be able to extract the last 5s from it.

I prefer GUIs, but if there are none, command line tools are fine too.