As far as i know, there is no vanilla functionality that allows to pack all UV islands on the same place, essentially stacking them on each other.
There is an addon that comes with Blender though that can help a bit.
The name is Magic UV, and it comes with it's own Pack UV function:
The needed preparation is not too complicated if you do not have to many of those same islands:
- First of all, you will have to make sure they are all averaged out:
(this will ensure that the islands are all having the same size in the UV editor, if they are the same size on the object.)
- Now you adjust the snapping option to vertices
- Now you have to go through all same islands.(single face or group of faces can be an island, what matters is the island is the same as the one you want to stack on top)
- Select an Island and while moving it, hold Ctrl to snap on a vertex that makes the islands stack exactly on top of the other. Repeat until all same islands are stacked up.
- Select all UV islands with A
- Then finally go in the UV menu and use the above mentioned UV Manipulation->Pack UV function. Adjust the parameters to better suit your needs.
Here a visual demonstration: