PreReleaseDelist 0.1.0

dotnet tool install --global PreReleaseDelist --version 0.1.0
                    
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
                    
if you are setting up this repo
dotnet tool install --local PreReleaseDelist --version 0.1.0
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=PreReleaseDelist&version=0.1.0
                    
nuke :add-package PreReleaseDelist --version 0.1.0
                    

PrereleaseDelist

A CLI to delist pre-release versions of your NuGet package(s).

NuGet latest version NuGet downloads GitHub license OpenSSF Scorecard

Features

  • Delist specific pre-release versions of a NuGet package.
  • Delist all pre-release versions of a NuGet package.
  • Configure NuGet API Key and Server URL via environment variables.

Installation

Install (as a .NET Global Tool)

The CLI is published as a dotnet global tool:

dotnet tool install --global PreReleaseDelist

After installing, the prerelease-delist command will be available on your PATH.

Prerequisites

Build

dotnet build -c Release

Usage

Arguments and Options

Name Type Required Default Description
versions (argument) string[] Yes (unless --delist-all is used) — One or more pre-release version strings to delist. Only version strings starting with a digit are considered; others are ignored.
--package-id string Yes — The ID of the package to delist, e.g. MyPackage.
--api-key string Yes* — The NuGet API key to authenticate with. If omitted, the CLI falls back to the PRERELEASEDELIST_NuGetApiKey or NUGET_API_KEY environment variables.
--server-url string No https://api.nuget.org/v3/index.json The NuGet server's V3 service index URL. Useful for third-party NuGet servers. Falls back to the PRERELEASEDELIST_NuGetServerUrl or NUGET_SERVER_URL environment variables.
--delist-all boolean No false Delist all pre-release versions of the package instead of the explicitly listed versions.
--include-zero-major boolean No false With --delist-all, also include stable 0.x (Major == 0) versions.
--use-strict-parsing boolean No true When true, an invalid version string causes an error. When false, invalid version strings are silently skipped.
--backend http | sdk No http Which delisting backend to use: the V3 http API, or the .NET SDK's package deprecation/delist support (sdk).
--non-interactive boolean No false Print a machine-friendly Version=<version> Status=<Success\|Failure> ... line per version and exit with a non-zero code if any version failed to delist. Useful in CI.

* Required either on the command line or via environment variable (see Configuration below).

Environment Variables

The CLI enables DotMake command-line directives, so you can set environment variables inline for a single run using the DotMake [env:...] directive:

prerelease-delist --package-id "MyPackage" --api-key "myApiKey" [env:NuGetServerUrl=https://my-server/api/v3/index.json]

Configuration

Options can also be satisfied from environment variables instead of the command line. Precedence is: explicit --api-key/--server-url command-line options first, then PRERELEASEDELIST_-prefixed environment variables, then generic NUGET_* environment variables, then built-in defaults.

Option PRERELEASEDELIST_ env var Generic env var
--api-key PRERELEASEDELIST_NuGetApiKey NUGET_API_KEY
--server-url PRERELEASEDELIST_NuGetServerUrl NUGET_SERVER_URL
# bash
export NUGET_API_KEY="myApiKey"
export NUGET_SERVER_URL="https://api.nuget.org/v3/index.json"
# PowerShell
$env:NUGET_API_KEY = "myApiKey"
$env:NUGET_SERVER_URL = "https://api.nuget.org/v3/index.json"

The --api-key lookup order is therefore: --api-key option → PRERELEASEDELIST_NuGetApiKey → NUGET_API_KEY → error (the CLI exits with a message if no key is found). If neither server-URL variable is set, the CLI falls back to https://api.nuget.org/v3/index.json.

Examples

Delist specific pre-release versions of a package:

prerelease-delist --package-id "MyPackage" --versions "1.0.0-alpha.1" "1.0.0-alpha.2" --api-key "myApiKey"

Delist all pre-release versions of a package:

prerelease-delist --package-id "MyPackage" --delist-all true --api-key "myApiKey"

Delist all pre-release versions, including stable 0.x versions:

prerelease-delist --package-id "MyPackage" --delist-all true --include-zero-major true --api-key "myApiKey"

Delist from a third-party NuGet server:

prerelease-delist --package-id "MyPackage" --versions "2.0.0-beta.4" --api-key "myApiKey" --server-url "https://my-server/api/v3/index.json"

Use the .NET SDK backend instead of the HTTP API:

prerelease-delist --package-id "MyPackage" --versions "1.2.0-pre.1" --api-key "myApiKey" --backend sdk

Run non-interactively (e.g. in CI), turning on lenient version parsing:

prerelease-delist --package-id "MyPackage" --versions "0.9.0-beta" "1.0.0-alpha" --api-key "myApiKey" --non-interactive true --use-strict-parsing false

Rate Limits

NuGet.org's NuGet server implementation has an API rate limit for delisting packages of 250 package versions per hour per API Key.

Third party NuGet servers may have their own rate limits. Please check your NuGet server's documentation for more information.

This CLI tries to gracefully fail (and inform you) if you exceed the API rate limit.

License

The CLI project is licensed under the GNU GPL v3.0 or later – see the LICENSE file for details.

The library powering the CLI's NuGet-related functionality is licensed under the GNU LGPL v3.0 or later.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last Updated
0.1.0 85 9/18/2026

Initial Release