How to show the latest version of an npm package (2024)

In this tutorial, we are going to learn about how to see the latest (remote) version of an npm packagein the command line.

If we run an npm install package command, it will install the latest available version of an npm package, but after some time the package we installed is outdated and we need to see the latest version.

To see the latest version of an npm package before installing, we can use the following command:

npm view express version

This above command prints the latest remote version of an express package.

or you can also use the npm show command:

npm show express version

If you want to see the current and latest versions of all npm packages that are present inside your package.json file, you can use:

npm outdated

Output:

Package Current Wanted Latest Locationdate-fns 2.15.0 2.16.1 2.16.1 node-app
How to show the latest version of an npm package (2024)
Top Articles
Latest Posts
Article information

Author: Geoffrey Lueilwitz

Last Updated:

Views: 6142

Rating: 5 / 5 (60 voted)

Reviews: 91% of readers found this page helpful

Author information

Name: Geoffrey Lueilwitz

Birthday: 1997-03-23

Address: 74183 Thomas Course, Port Micheal, OK 55446-1529

Phone: +13408645881558

Job: Global Representative

Hobby: Sailing, Vehicle restoration, Rowing, Ghost hunting, Scrapbooking, Rugby, Board sports

Introduction: My name is Geoffrey Lueilwitz, I am a zealous, encouraging, sparkling, enchanting, graceful, faithful, nice person who loves writing and wants to share my knowledge and understanding with you.