🔥 All-Access Pass — $199 USD (Regular $499) · Unlock all 2,836 Astro themes ➔
komal.nakrani
Get All-Access Pass ($199)
ThemesCategoriesDocsBlogTips & TricksPricingGet All-Access Pass ($199)
Astro Fundamentals••By Komal Nakrani

Check Your Astro Version: 5 Quick Ways

Check your Astro version with npx astro --version, npm ls astro, astro info or Astro.generator, and see the latest release. Why package.json alone can mislead.

#Astro#Astro Version#CLI#Upgrade

To check your Astro version, run npx astro --version in your project folder; it prints the installed version, such as astro v7.4.4. For the version plus your adapter, integrations and Node.js in one report, run npx astro info. The number in package.json is a version range, not necessarily what’s installed, so trust the command output over the file.

Key Takeaways

  • npx astro --version prints the exact installed Astro version.
  • npm ls astro shows the installed version and whether integrations pull in a second copy.
  • package.json shows a range like ^7.2.0; the lockfile records what’s actually installed.
  • npm view astro version tells you the latest release on npm.

1. astro –version

# terminal
npx astro --version

Output:

  astro  v7.4.4

Run it from the project root. npx uses the project’s local copy from node_modules, so you get your project’s version, not a global one. With pnpm or Yarn, use pnpm astro --version or yarn astro --version.

2. npm ls astro

# terminal
npm ls astro
[email protected] /Users/me/my-site
├─┬ @astrojs/[email protected]
│ └── [email protected] deduped
└── [email protected]

This is the best check when you suspect a mismatch. deduped means the integration uses your copy of Astro. If an integration lists a different Astro version under it, your dependencies are out of step; npx @astrojs/upgrade lines them back up. The pnpm equivalent is pnpm why astro.

3. astro info

# terminal
npx astro info

It prints Astro, Vite and Node.js versions, your OS, package manager, output mode, adapter and integrations, then offers to copy the report. Use it whenever you report a bug; the astro info tip walks through each line.

4. package.json and the lockfile

// package.json
{
  "dependencies": {
    "astro": "^7.2.0"
  }
}

The caret means “7.2.0 or any later 7.x”, so this project could have 7.2.0 or 7.4.4 installed. For the exact version without running anything, look in the lockfile: search package-lock.json for "node_modules/astro", or pnpm-lock.yaml for astro@. The lockfile is also how you find which version an old commit used: check out the commit and read it there.

You can also read the installed package directly:

# terminal
node -p "require('astro/package.json').version"

5. Astro.generator in a page

Inside any .astro file, Astro.generator holds the running version as a string such as Astro v7.4.4:

---
// src/layouts/BaseLayout.astro
---
<head>
  <meta name="generator" content={Astro.generator} />
</head>

Many sites, including Astro’s own starters, add this generator meta tag. It’s also a way to see the version of a deployed site: view the page source and look for <meta name="generator">.

Check the latest Astro version

# terminal
npm view astro version

That prints the newest release on npm. Compare it with your installed version; if you’re behind by a minor or patch, npx @astrojs/upgrade updates Astro and official integrations together. Release dates and what each version added are in our Astro version history, and moving between majors is covered in upgrade from Astro 6 to Astro 7.

Before upgrading, also check node -v: Astro 7.4.2 and later need Node.js 22.23.4 or newer. Komal themes ship on Astro 7 with free lifetime updates; our theme installation docs list the setup, and every theme in the catalog has a live preview. Astro’s CLI reference documents --version and info.

FAQ

How do I know which version of Astro I have?

Run npx astro --version in your project folder. It prints the installed version from node_modules, for example astro v7.4.4.

What is the latest version of Astro?

Run npm view astro version for the current release. Astro 7.4 came out on October 15, 2026, and the 7.4.x patch releases followed.

Why does package.json show a different Astro version?

package.json holds a version range such as ^7.2.0, which allows newer 7.x releases. The installed version comes from your lockfile, so npx astro --version can show a higher number.

How do I check the Astro version of a live website?

View the page source and search for <meta name="generator". Sites that output Astro.generator show the version there, such as Astro v7.4.4. Sites that removed the tag don’t reveal it.