In the business unit in which you need to delete data extensions make the following DE
Name: DEtoDelete
External Key: DEtoDelete
| Field Name | Data Type | Length | Primary Key | Nullable | Default Value |
| DEName | Text | 254 | No | No | Not Applicable |
| isprocessed | Boolean | Not Applicable | No | No | False |
Populate the DE with the DE names which need to be deleted.
Create an SSJS activity with the following code
<script runat="server">
Platform.Load("core", "1.1.1");
var api = new Script.Util.WSProxy();
var rowstoprocess = DataExtension.Init("DEtoDelete").Rows.Lookup(["isprocessed"],[0])
for(j=0; j < rowstoprocess.length; j ++ )
{
var dataExtensionName = rowstoprocess[j].DEName
var req = api.retrieve("DataExtension", ["CustomerKey"], {
Property: "Name",
SimpleOperator: "equals",
Value: dataExtensionName
});
var customerKey = req.Results[0].CustomerKey;
var res = api.deleteItem("DataExtension", { "CustomerKey":customerKey });
DataExtension.Init('DEtoDelete').Rows.Update({"isprocessed": "1"}, ["DEName"], [dataExtensionName]);
}
</script>
Run the above SSJS activity to delete any data extensions within the DE "DEtoDelete"
Each occurance of the script will delete only 2000 DE, to delete more, run the activity additional times
If the SSJS errors with a timeout (30mins) run the activity again to delete the remaining DEs
000395614

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.