How to Install SQLite3 on macOS, Windows and Linux (Tested)

Whether the sqlite3 shell is already installed depends on the operating system: macOS includes it and Windows doesn’t. On Linux, it depends on the distribution. In this article I’ll walk you through installing a current sqlite3 shell on each desktop system, and checking that it works.

TLDR

  • macOS: sqlite3 is already installed. For a newer version, run brew install sqlite.
  • Windows: winget install SQLite.SQLite, or unzip sqlite-tools-win-x64-….zip from sqlite.org into a folder on your PATH.
  • Debian and Ubuntu: sudo apt install sqlite3. Fedora: sudo dnf install sqlite. Alpine: apk add sqlite.
  • Check it with sqlite3 --version.

What are you installing?

SQLite comes in two pieces, and you might need either one:

PieceWhat it isWho needs it
The sqlite3 shellA command-line program where you type SQL and see resultsAnyone who wants to open .db files, run queries or follow a tutorial
The SQLite libraryThe database engine that programs link toDevelopers. Languages such as Python already include it

This guide installs the shell. If you only use SQLite from Python, the sqlite3 module is part of Python’s standard library, so there’s nothing to install. See Python SQLite3 tutorial.

Prerequisites

SystemPackage manager or downloadVersion I got on 7 October 2026
macOSBuilt in, Homebrew, or the sqlite.org zip3.51.0 built in; 3.53.4 from Homebrew and the zip
Windowswinget, or the sqlite.org zip3.53.4 in the winget manifest (not executed)
Debian stableapt3.46.1
Fedoradnf3.51.2
Alpineapk3.53.4

The latest release on the SQLite download page was 3.53.4. Distribution packages lag behind it by different amounts.

How to install SQLite

Pick the section for your system. Each one ends with sqlite3 --version, which prints the version and its release date.

Step 1 on macOS: use the built-in shell or Homebrew

macOS already has /usr/bin/sqlite3:

$ which sqlite3
/usr/bin/sqlite3
$ sqlite3 --version
3.51.0 2025-06-12 13:14:41 f0ca7bba1c5e232e5d279fad6338121ab55af0c8c68c84cdfb18ba5114dcaapl (64-bit)

For a newer version, install it with Homebrew (brew install sqlite). It was already installed on this Mac, so the output below checks it. Homebrew doesn’t link it over the built-in one, so call it by its full path or put it first on your PATH:

$ brew list --versions sqlite
sqlite 3.53.4
$ $(brew --prefix sqlite)/bin/sqlite3 --version
3.53.4 2026-07-24 19:02:57 bf7c7f30031888f4e796e429ab3978879485813aaca6f641c7b33e4e09459bcc (64-bit)

Homebrew’s own note says the formula is “keg-only … because macOS already provides this software”. To use it by default, add export PATH="$(brew --prefix sqlite)/bin:$PATH" to ~/.zshrc.

Step 1 on macOS without Homebrew: the sqlite.org zip

The download page has a ready-built sqlite-tools-osx-arm64-….zip with the shell and other tools:

$ curl -sO https://www.sqlite.org/2026/sqlite-tools-osx-arm64-3530400.zip && echo downloaded
downloaded
$ unzip -o sqlite-tools-osx-arm64-3530400.zip | grep inflating
  inflating: sqlite3
  inflating: sqldiff
  inflating: sqlite3_analyzer
  inflating: sqlite3_rsync
$ ./sqlite3 --version
3.53.4 2026-07-24 19:02:57 bf7c7f30031888f4e796e429ab3978879485813aaca6f641c7b33e4e09459bcc (64-bit)

If you download the zip in a browser instead of with curl, macOS may block the unsigned programs. The download page’s fix is xattr -d com.apple.quarantine sqlite3.

Step 1 on Windows: winget or the zip (not executed here)

With winget:

winget install SQLite.SQLite

The winget package installs the same sqlite.org tools zip and adds sqlite3 as a command (winget manifest). Without winget:

  • Download sqlite-tools-win-x64-….zip from the download page (win-arm64 for ARM devices).
  • Unzip it to a folder such as C:\sqlite.
  • Add that folder to your PATH in System Properties > Environment Variables, then open a new terminal.

The sqlite-dll-win-… zips hold only sqlite3.dll, the library for programs. You don’t need them for the shell. More detail in Install SQLite3 on Windows.

Step 1 on Linux: your package manager

Debian and Ubuntu name the package sqlite3:

$ apt-get update && apt-get install -y sqlite3
$ sqlite3 --version
3.46.1 2024-08-13 09:16:08 c9c2ab54ba1f5f46360f1b4f35d849cd3f080e6fc2b6c60e91b16c63f69aalt1 (64-bit)

Fedora names it sqlite:

$ dnf install -y sqlite
$ sqlite3 --version
3.51.2 2026-01-09 17:27:48 b270f8339eb13b504d0b2ba154ebca966b7dde08e40c3ed7d559749818cbalt1 (64-bit)

Alpine names it sqlite too:

$ apk add sqlite
$ sqlite3 --version
3.53.4 2026-07-24 19:02:57 bf7c7f30031888f4e796e429ab3978879485813aaca6f641c7b33e4e09459bcc (64-bit)

For a newer version than your distribution ships, sqlite.org has a sqlite-tools-linux-x64-….zip for x64 machines (not executed here).

Check that it works

Create a database and read a row back from it:

$ sqlite3 test.db "CREATE TABLE t (msg TEXT); INSERT INTO t VALUES ('hello'); SELECT * FROM t;"
hello
$ ls test.db
test.db

If sqlite3 --version prints a version, the shell is installed. If you’re using SQLite from Python, check the version Python uses. It can differ from the shell’s, because Python ships its own copy of the library:

$ python3 -c "import sqlite3; print(sqlite3.sqlite_version)"
3.51.0

Troubleshooting

These are the problems you’ll hit right after installing.

sqlite3: not found

The shell isn’t installed, or its folder isn’t on your PATH. On a bare Debian container:

$ sqlite3 --version
sh: 1: sqlite3: not found

Install it with your package manager. On Windows, open a new terminal after changing PATH, because open terminals keep the old one.

An old version even after installing a new one

Another sqlite3 comes first on your PATH. On macOS that’s /usr/bin/sqlite3. which sqlite3 (or where sqlite3 on Windows) shows which one runs.

macOS blocks sqlite3 from the zip

Run xattr -d com.apple.quarantine sqlite3 in the folder you unzipped, as the download page says.

The first problem was reproduced above. The other two weren’t.

Upgrading or uninstalling

  • Homebrew: brew upgrade sqlite, or brew uninstall sqlite. The built-in macOS shell stays.
  • apt, dnf, apk: the system upgrade command updates SQLite with the rest of the system.
  • Zip installs: replace or delete the files in the folder you unzipped.

Conclusion

On macOS you already have SQLite, and Homebrew gives you the newest one. On Windows, winget is the shortest route. Linux users install the package their distribution names sqlite3 or sqlite. Then run sqlite3 --version to confirm, and sqlite3 test.db to open your first database. If you’d rather click than type, a GUI such as DB Browser for SQLite opens the same files (not covered here).

Further reading

Tested with SQLite 3.51.0 and 3.53.4 on macOS and in Linux containers on 7 October 2026. Windows steps weren’t executed.