← All procedures

npm.distTags.remove

Remove a dist-tag of a package, in the registry. It needs confirm: true

CLI
Package
@procedures/npm · README
Path
["npm","distTags","remove"]
CLI
mark npm distTags remove --package <string> --tag <string> --confirm <boolean>
As data
{"$proc":["npm","distTags","remove"],"input":{}}

Use it

In TypeScript

import { Client, LocalTransport, PROCEDURE_REGISTRY } from "@procedures/client";
import "@procedures/npm/register"; // registers its procedures

const client = new Client(new LocalTransport({ registry: PROCEDURE_REGISTRY }));
const result = await client.exec(["npm","distTags","remove"], { package: "<package>", tag: "<tag>", confirm: true });
console.log(JSON.stringify(result));

From the command line

$ mark npm distTags remove --package <string> --tag <string> --confirm <boolean>

As data, in a program

{
  "$proc": ["npm", "distTags", "remove"],
  "input": { "package": "<package>", "tag": "<tag>", "confirm": true }
}

Input

FieldTypeRequiredDefaultDescription
packagestringyesThe package, for example zod or @scope/name
tagstringyesThe dist-tag, for example next. npm refuses to remove latest
confirmbooleanyesMust be true: the call changes the registry for each user of the package
otpstringnoA one-time password, when the account has two-factor authentication
registrystringnoThe URL of the registry (default: the registry of the npm configuration)
cwdstringnoWorking directory
timeoutnumbernoTimeout in milliseconds

Output

FieldTypeRequiredDefaultDescription
exitCodenumberyesThe exit code of npm (0 is success)
stdoutstringyesThe standard output of npm
stderrstringyesThe standard error of npm, or the error message when npm did not start
successbooleanyesTrue when the exit code is 0
durationnumberyesThe time of the command, in milliseconds
JSON Schemas
{
  "input": {
    "type": "object",
    "properties": {
      "package": {
        "type": "string",
        "description": "The package, for example zod or @scope/name"
      },
      "tag": {
        "type": "string",
        "description": "The dist-tag, for example next. npm refuses to remove latest"
      },
      "confirm": {
        "type": "boolean",
        "const": true,
        "description": "Must be true: the call changes the registry for each user of the package"
      },
      "otp": {
        "description": "A one-time password, when the account has two-factor authentication",
        "type": "string"
      },
      "registry": {
        "description": "The URL of the registry (default: the registry of the npm configuration)",
        "type": "string"
      },
      "cwd": {
        "description": "Working directory",
        "type": "string"
      },
      "timeout": {
        "description": "Timeout in milliseconds",
        "type": "number"
      }
    },
    "required": [
      "package",
      "tag",
      "confirm"
    ]
  },
  "output": {
    "type": "object",
    "properties": {
      "exitCode": {
        "type": "number",
        "description": "The exit code of npm (0 is success)"
      },
      "stdout": {
        "type": "string",
        "description": "The standard output of npm"
      },
      "stderr": {
        "type": "string",
        "description": "The standard error of npm, or the error message when npm did not start"
      },
      "success": {
        "type": "boolean",
        "description": "True when the exit code is 0"
      },
      "duration": {
        "type": "number",
        "description": "The time of the command, in milliseconds"
      }
    },
    "required": [
      "exitCode",
      "stdout",
      "stderr",
      "success",
      "duration"
    ],
    "additionalProperties": {}
  }
}