Soenneker.Blob.Delete 11.0.3182

Prefix Reserved
dotnet add package Soenneker.Blob.Delete --version 11.0.3182
                    
NuGet\Install-Package Soenneker.Blob.Delete -Version 11.0.3182
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Soenneker.Blob.Delete" Version="11.0.3182" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.Blob.Delete" Version="11.0.3182" />
                    
Directory.Packages.props
<PackageReference Include="Soenneker.Blob.Delete" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Soenneker.Blob.Delete --version 11.0.3182
                    
#r "nuget: Soenneker.Blob.Delete, 11.0.3182"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Soenneker.Blob.Delete@11.0.3182
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Soenneker.Blob.Delete&version=11.0.3182
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.Blob.Delete&version=11.0.3182
                    
Install as a Cake Tool

alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image

Soenneker.Blob.Delete

Deletes individual Azure blobs, entire containers, or every blob under a virtual-directory prefix.

Install

dotnet add package Soenneker.Blob.Delete

Register the utility in Program.cs:

using Soenneker.Blob.Delete.Registrars;
builder.Services.AddBlobDeleteUtilAsSingleton();

Scoped registration is also available.

The underlying Blob packages require Azure:Storage:Blob:ConnectionString in configuration. Store that value in a secret provider.

Delete one blob

Response<bool> response = await blobDelete.Delete(
    "invoices",
    "2026/obsolete.pdf",
    cancellationToken);

bool deleted = response.Value;

false means the blob did not exist. Azure authorization, lease, snapshot, and service failures throw RequestFailedException. The default Azure delete behavior does not include snapshots, so a blob with snapshots may require explicit snapshot cleanup before this method can delete it.

Delete a virtual directory

Azure Blob Storage has blob-name prefixes rather than physical directories. This method lists the supplied prefix and deletes each returned blob sequentially:

bool allDeleted = await blobDelete.DeleteDirectory(
    "exports",
    "temporary/2026/",
    cancellationToken);

The result is true when every listed blob was deleted or no blobs matched. It is false if a listed blob disappeared before its delete completed. Azure request failures are not converted to false; they stop the operation and propagate.

Prefix matching can include more blobs than intended when the trailing delimiter is omitted. Use temporary/2026/, not temporary/2026, when only that virtual directory should be removed.

Delete a container

bool deleted = await blobDelete.DeleteContainer(
    "temporary-exports",
    cancellationToken);

Container deletion removes all blobs, versions, and snapshots in that container. Treat the container name as trusted application configuration, not direct user input.

Important behavior

  • The shared client/container utilities normalize container names to lowercase.

  • Those utilities ensure the target container exists while resolving clients. As a result, deleting a missing blob or container can briefly create the missing container before deletion. Avoid using these methods as existence probes.

  • Directory deletion is not transactional. Cancellation or a failure can leave a partially deleted prefix.

  • Soft delete, versioning, immutability policies, legal holds, and leases can change whether data is recoverable or whether deletion is allowed.

  • Cancellation stops pending work; it does not undo work that has already completed.

Product Compatible and additional computed target framework versions.
.NET net11.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Soenneker.Blob.Delete:

Package Downloads
Soenneker.Blob.Suite

A concoction of Azure Blob Storage utilities and libraries

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
11.0.3182 86 11/11/2026
11.0.3181 83 11/11/2026
11.0.3179 94 11/11/2026
11.0.3178 79 11/11/2026
11.0.3175 102 11/11/2026
11.0.3174 86 11/11/2026
11.0.3173 79 11/11/2026
11.0.3172 157 11/3/2026
11.0.3171 100 11/3/2026
11.0.3170 96 11/3/2026
11.0.3169 100 11/3/2026
11.0.3168 87 11/3/2026
11.0.3167 91 11/3/2026
11.0.3166 135 11/3/2026
11.0.3165 212 10/27/2026
11.0.3164 111 10/27/2026
11.0.3163 97 10/27/2026
11.0.3162 131 10/27/2026
11.0.3161 88 10/27/2026
11.0.3160 108 10/27/2026
Loading failed

Updated Multiple NuGet packages