It is not possible to delete a data source from an environment once it has been added and saved.
If someone adds a data source by mistake and wants to delete it after saving the environment, the option is not available since it is grayed out.
What is the best way to delete a data source?
Release : 4.9.1
Component : Web Portal - Data Modeling
This is working as designed. Once an environment has been saved, you cannot go back and delete a data source from the environment.
You must delete the entire environment and recreate it. For example, the Environment "32862820_Test", which has two data sources: Travel and Test.
The only way to remove a data source is to delete the environment and recreate it.
Note, you can modify the Connection Profile for an existing Data Source, but you can delete the data source without deleting the entire Environment.
As far as how to remove it from the database, that could get quite messy, since some information is stored in the OrientDB database.
There is an Enhancement Request (US776811) to add this functionality to a future release of TDM