ArcGIS Pro 2.8 API Reference Guide
DeleteGeodatabase(FileGeodatabaseConnectionPath) Method
Example 

ArcGIS.Core.Data.DDL Namespace > SchemaBuilder Class > DeleteGeodatabase Method : DeleteGeodatabase(FileGeodatabaseConnectionPath) Method
Represents the physical path of the file ArcGIS.Core.Data.Geodatabase.
Deletes the file ArcGIS.Core.Data.Geodatabase at the specified path.
Syntax
public static void DeleteGeodatabase( 
   FileGeodatabaseConnectionPath fileGeodatabaseConnectionPath
)
Public Overloads Shared Sub DeleteGeodatabase( _
   ByVal fileGeodatabaseConnectionPath As 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
// 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 10, Windows 8.1

See Also

Reference

SchemaBuilder Class
SchemaBuilder Members
Overload List