LinuxCommandLibrary

npm-deprecate

TLDR

Deprecate package version

$ npm deprecate [package]@[version] "[message]"
copy
Deprecate version range
$ npm deprecate [package]@"<[1.0.0]" "[message]"
copy
Deprecate all versions
$ npm deprecate [package] "[message]"
copy
Remove deprecation
$ npm deprecate [package]@[version] ""
copy

SYNOPSIS

npm deprecate pkg@version message

DESCRIPTION

npm deprecate marks a package version as deprecated on the npm registry. Users installing deprecated versions will see a warning message.
This is commonly used to discourage use of old or vulnerable versions while still allowing installation.

PARAMETERS

pkg@version

Package and version(s) to deprecate.
message
Deprecation message (empty to remove).

EXAMPLES

$ # Deprecate specific version
npm deprecate my-package@1.0.0 "Critical bug, please upgrade"

# Deprecate old versions
npm deprecate my-package@"<2.0.0" "Version 1.x is no longer supported"

# Remove deprecation
npm deprecate my-package@1.0.0 ""
copy

USE CASES

$ - Security vulnerabilities
- Breaking changes
- Package renamed
- End of support
copy

CAVEATS

Requires publish access to package. Doesn't prevent installation. Empty message removes deprecation.

HISTORY

npm deprecate was added to provide a softer alternative to unpublishing, allowing maintainers to warn users without breaking existing installations.

SEE ALSO

> TERMINAL_GEAR

Curated for the Linux community

KIWITATA 2X Classic SNES USB Controller for PC Gamings, Retro SNES Wired USB Game Emulator Controller for Windows XP 7 8 11 Mac Raspberry Pi

KIWITATA 2X Classic SNES USB Controller for PC Gamings, Retro SNES Wired USB Game Emulator Controller for Windows XP 7 8 11 Mac Raspberry Pi

$16.99
Lenovo Gen 13 ThinkPad X1 Carbon Touchscreen Laptop with Intel Ultra 7 265U Processor, 14" WUXGA 100% sRGB, 32GB DDR5 RAM, 1TB NVMe Performance SSD, FHD+ IR+ RGB Camera, and Windows 11 Pro

Lenovo Gen 13 ThinkPad X1 Carbon Touchscreen Laptop with Intel Ultra 7 265U Processor, 14" WUXGA 100% sRGB, 32GB DDR5 RAM, 1TB NVMe Performance SSD, FHD+ IR+ RGB Camera, and Windows 11 Pro

$1,589.00
BOSGAME Mini PC N95, Intel 12th Mini Computers| 16GB DDR4 RAM| 512GB M.2 2280 SSD| 4K 60HZ Triple Displays by Dual HDMI+Type-C, 6W TDP Quiet Mini PC, WIFI5, BT 5.0 Office

BOSGAME Mini PC N95, Intel 12th Mini Computers| 16GB DDR4 RAM| 512GB M.2 2280 SSD| 4K 60HZ Triple Displays by Dual HDMI+Type-C, 6W TDP Quiet Mini PC, WIFI5, BT 5.0 Office

$239.99
Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community

GMKtec Gaming PC, K11 AMD Ryzen 9 8945HS, 32GB DDR5 RAM 1TB Mini PC Desktop Computer, Oculink, Dual NIC 2.5GbE LAN, HDMI/DisplayPort/USB4*2

GMKtec Gaming PC, K11 AMD Ryzen 9 8945HS, 32GB DDR5 RAM 1TB Mini PC Desktop Computer, Oculink, Dual NIC 2.5GbE LAN, HDMI/DisplayPort/USB4*2

$739.99
BOSGAME Mini PC N95, Intel 12th Mini Computers| 16GB DDR4 RAM| 512GB M.2 2280 SSD| 4K 60HZ Triple Displays by Dual HDMI+Type-C, 6W TDP Quiet Mini PC, WIFI5, BT 5.0 Office

BOSGAME Mini PC N95, Intel 12th Mini Computers| 16GB DDR4 RAM| 512GB M.2 2280 SSD| 4K 60HZ Triple Displays by Dual HDMI+Type-C, 6W TDP Quiet Mini PC, WIFI5, BT 5.0 Office

$239.99
Raspberry Pi 5 8GB

Raspberry Pi 5 8GB

$134.50