see on GitHub

Operations: How to Remove Connection String

You can remove a connection string by using RemoveConnectionStringOperation.

Syntax

public RemoveConnectionStringOperation(T connectionString)

Parameters
connectionString T Connection string to remove: RavenConnectionString or SqlConnectionString

Example - Remove Raven Connection String

RemoveConnectionStringOperation<RavenConnectionString> operation =
    new RemoveConnectionStringOperation<>(connectionString);

store.maintenance().send(operation);

Example - Remove Sql Connection String

RemoveConnectionStringOperation<SqlConnectionString> operation =
    new RemoveConnectionStringOperation<>(connectionString);

store.maintenance().send(operation);