Once you put the first Lync 2013 Server into your environment you will need to use the 2013 Topology builder to manage the topology.
The new Topology builder layout groups the “Shared Components” for each site, which makes more sense with new options around SQL, Office Web Apps and Trunks.
If you want to remove a gateway from this environment, you will have to remove the associated Trunks first. Trunks are effectively a mapping between a mediation pool and a gateway, which means more than one mediation server/pool can be associated to the same gateway
e.g. If I want to remove gateway 1.1.1.2
I can’t delete the gateway because have to remove the trunks first
So I remove trunk “2013se01-1.1.1.2″ no problem
However delete is missing to remove the “1.1.1.2″ Trunk?
This is actually because the 1.1.1.2 Trunk is associated with a 2010 Mediation server (actually a 2010 SE). You can’t delete these trunks as they are a 1 to 1 fixed mapping with the gateway. In fact if you notice the original delete error message it only list the 2013 trunk to remove.
However, with only a 2010 mediation pool associated with the gateway, now if I try to delete the gateway I can.
Gateway deleted:
So in a mixed 2010 /2013 Topology you must remove all the 2013 Trunks before you can remove a gateway, but you do not have to remove the 2010 “trunks” before you can delete it.