When subscribing to an API, the selected plan, the application that wants to subscribe to the API and the subscription itself are automatically deployed to the respective environment.
A deployment may fail if, for example, the agent is not connected.
The deployment can simply be retried later.
APIs are not removed from gateways when they are deleted.
Plans, Applications and Subscriptions are undeployed before they are deleted. If this fails, the deletion will be aborted.
You can fix the error and then try again or use the force delete.
...