Last updated: Apr 4, 2024
Reading timeยท2 min
You can check your Bootstrap version by opening your bootstrap.css
or
bootstrap.min.css
file. The second line of the file contains information about
which version of Bootstrap is being loaded by the file, e.g.
Bootstrap v5.2.3
.
@charset "UTF-8";/*! * Bootstrap v5.2.3 (https://getbootstrap.com/) * Copyright 2011-2022 The Bootstrap Authors * Copyright 2011-2022 Twitter, Inc. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) */
The file will most likely be named bootstrap.min.css
or bootstrap.css
.
An alternative way to check your Bootstrap version is to use the developer tools in your browser:
bootstrap.min.css
file and then click on Preview.If you installed the bootstrap
package using npm
, you can check your version by opening your terminal in your
project's root directory (where your package.json
file is) and issuing the
following command.
npm ls bootstrap npm ls bootstrap --depth=0
bootstrap
package in the dependencies
object in your package.json
file.If you need to install bootstrap
locally to your project, open your terminal
in your project's root directory and run the following command.
# ๐๏ธ install `bootstrap` npm install bootstrap # ๐๏ธ install the latest version of `bootstrap` npm install bootstrap@latest
If you need to get the latest version of bootstrap
, use the
npm view bootstrap version
command.
npm view bootstrap version
If you want to list all versions of the bootstrap
package, use the
npm view bootstrap versions
command.
npm view bootstrap versions npm view bootstrap versions --json
If you want to install a specific version of bootstrap
, use the @
symbol to
specify the version.
npm install bootstrap@5.2.3 # ๐๏ธ if you get an error npm install bootstrap@5.2.3 --legacy-peer-deps
If you need to update bootstrap
to the latest version, use the following
command.
npm install bootstrap@latest # ๐๏ธ if you get an error npm install bootstrap@latest --legacy-peer-deps
You can use the npm outdated
command to list the current version and the
latest version of your npm
packages.
npm outdated
You can use the npm update
command to update your locally installed packages
or the npm update -g
command to update your globally installed NPM packages.
# ๐๏ธ update ALL locally installed packages npm update # ๐๏ธ update ALL globally installed packages npm update -g
The npm update
command follows the version constraints specified in your
package.json
file.