# npm outdated

# Find outdated npm packages

Simply run the below script and it will show you the packages you want to update

The results will have the below columns:

1. Sl No.
    
2. Package
    
3. Type
    
4. Current
    
5. Wanted
    
6. Latest
    

Here is the working script.

```bash
npm outdated --json 2>/dev/null \
| jq -r '
    to_entries[]
    | [.key,
       (.value.type // "-"),
       (.value.current // "-"),
       (.value.wanted // "-"),
       (.value.latest // "-")]
    | @tsv
' \
| sort -t$'\t' -k4V \
| awk 'BEGIN {print "S.No\tPackage\tType\tCurrent\tWanted\tLatest"} {print NR "\t" $0}' \
| column -s $'\t' -t
```

Output looks like this

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1761542646269/afcf9403-b257-4626-a227-0014d3fe244a.png align="center")
