ArcGIS Pro 3.0 API Reference Guide
ArcGIS.Core.Data.DDL Namespace / SchemaBuilder Class / DeleteGeodatabase Method / DeleteGeodatabase(FileGeodatabaseConnectionPath) Method
Represents the physical path of the file ArcGIS.Core.Data.Geodatabase.
Example

DeleteGeodatabase(FileGeodatabaseConnectionPath) Method
Deletes the file ArcGIS.Core.Data.Geodatabase at the specified path.
Syntax
public static void DeleteGeodatabase( 
   FileGeodatabaseConnectionPath fileGeodatabaseConnectionPath
)

Parameters

fileGeodatabaseConnectionPath
Represents the physical path of the file ArcGIS.Core.Data.Geodatabase.
Exceptions
ExceptionDescription
The length of the local path is greater than 215 characters.
fileGeodatabaseConnectionPath is null.
The input path does not contain a file ArcGIS.Core.Data.Geodatabase.
A geodatabase-related exception has occurred.
Example
Deleting a File Geodatabase
// Create a FileGeodatabaseConnectionPath with the name of the file geodatabase you wish to delete
FileGeodatabaseConnectionPath fileGeodatabaseConnectionPath = new FileGeodatabaseConnectionPath(new Uri(@"C:\Path-To-File-Geodatabase\YourName.gdb"));

// Delete the file geodatabase
SchemaBuilder.DeleteGeodatabase(fileGeodatabaseConnectionPath);
Requirements

Target Platforms: Windows 11, Windows 10, Windows 8.1

ArcGIS Pro version: 2.8 or higher.
See Also