There is no automated way to remove the agents from the UI. The agents must be removed using the delete button from the Agent Overview page. There is a filter that can be used to narrow the agents listed. There is also a select all button.
If you remove an agent that is still active, it will be repopulated automatically when both the IP address of the agent has changed and either the server polling interval has elapsed (default is 15 minutes) or the agent has been restarted. However, removing the agent will remove the Agent Events from the database.
Note: Removing the Agent from Agents Overview does NOT delete or purge related Endpoint Incidents from Enforce.