How to Install DuckDB on Debian: The In-Process SQL OLAP Database

DuckDB is an in-process SQL OLAP database management system, often described as “SQLite for analytics”. Like SQLite, it runs inside your process with no server to configure and no daemon to keep alive; unlike SQLite, its columnar, vectorised engine is built for analytical queries over large datasets — aggregations, joins, and window functions across millions of rows.

What makes DuckDB genuinely useful day to day is that it can query files directly. Point it at a CSV, a Parquet file, or a directory of Parquet, and it will run full SQL over them without an import step. That makes the DuckDB command-line shell a fast, ergonomic way to explore data files, prototype queries, and build analytical pipelines, all from a single self-contained binary.

DuckDB is not available in Debian’s official repositories, so the usual options are downloading a release binary manually or installing a language binding. The unofficial deb.griffo.io repository provides an up-to-date .deb of the command-line client, letting you install it with apt and keep it current through normal system upgrades.

What Makes DuckDB Special?

  • ⚡ Vectorised columnar engine — designed for fast analytical queries, not just row lookups
  • 🧩 In-process, zero configuration — no server, no daemon, just a library and a CLI
  • 📁 Query files directly — run SQL over CSV, Parquet, and JSON without importing first
  • 🐘 Rich SQL dialect — window functions, CTEs, QUALIFY, list and struct types, and more
  • 🔌 Extensions — add capabilities like httpfs, parquet, json, and spatial on demand
  • 💾 Single-file databases — persist an entire database to one portable .duckdb file
  • 🚀 Fast imports and exports — read and write Parquet and CSV at high speed
  • 🌐 Reads remote data — query files over HTTP and S3 with the httpfs extension

Why Use the deb.griffo.io Repository?

The deb.griffo.io repository is a clean way to run DuckDB on Debian:

  • Easy installation and updates through the APT package manager
  • Automatic dependency management handled by Debian packaging
  • Always tracks upstream releases so you get new features and fixes quickly
  • No manual binary downloads to fetch and place on your PATH
  • Works across supported Debian releases including Bookworm, Trixie, and Sid

Prerequisites

Before you begin, make sure you have:

  • A Debian-based system (Bookworm 12, Trixie 13, or Sid)
  • sudo privileges
  • curl installed (sudo apt install curl if needed)

Step 1: Add the deb.griffo.io Repository

Add the signing key and repository:

# Create the keyrings directory
sudo install -d -m 0755 /etc/apt/keyrings

# Download and install the repository GPG key
curl -fsSL https://deb.griffo.io/EA0F721D231FDD3A0A17B9AC7808B4DD62C41256.asc | sudo gpg --dearmor --yes -o /etc/apt/keyrings/deb.griffo.io.gpg

# Add the repository (auto-detects your distro codename)
echo "deb [signed-by=/etc/apt/keyrings/deb.griffo.io.gpg] https://deb.griffo.io/apt $(lsb_release -sc 2>/dev/null) main" | sudo tee /etc/apt/sources.list.d/deb.griffo.io.list > /dev/null

# Update the package list
sudo apt update

What each command does:

  1. Keyrings directory — creates /etc/apt/keyrings with correct permissions for the key
  2. GPG key — downloads and de-armors the repository signing key for APT to verify packages
  3. Repository entry — adds the source, with lsb_release -sc filling in your Debian codename
  4. Package list — refreshes APT so DuckDB becomes installable

Step 2: Update the Package List

If you skipped the final command above, run it now:

sudo apt update

Step 3: Install DuckDB

Install the command-line client:

sudo apt install duckdb

This installs the duckdb binary and its dependencies.

Step 4: Verify the Installation

Confirm the version:

duckdb --version

You should see output similar to:

v1.1.3 19864453f7

Launch the interactive shell with no arguments to open a temporary in-memory database:

duckdb

Exit the shell at any time with .quit or ctrl-d.

Getting Started with DuckDB

DuckDB gives you a full SQL environment in a single binary. The examples below run inside the interactive shell.

The Interactive Shell

Start the shell, then run SQL directly. Statements end with a semicolon; dot-commands configure the shell:

-- Launch with: duckdb
CREATE TABLE people (id INTEGER, name VARCHAR, city VARCHAR);
INSERT INTO people VALUES (1, 'Ada', 'London'), (2, 'Linus', 'Helsinki');
SELECT city, count(*) AS n FROM people GROUP BY city ORDER BY n DESC;

Useful dot-commands include .tables to list tables, .schema to show DDL, .mode to change output formatting, and .help for the full list:

.mode box
.tables
.schema people

Persistent Databases with .open

By default DuckDB runs in memory and discards everything on exit. Use .open to attach a file-backed database that persists:

-- Open (creating if needed) a persistent database file
.open analytics.duckdb

You can also open a database directly from the command line:

duckdb analytics.duckdb

Anything you create in that session is saved to analytics.duckdb and available next time.

Querying Files Directly

This is DuckDB’s signature feature: run SQL over data files with no import step.

-- Query a CSV as if it were a table
SELECT * FROM read_csv_auto('sales.csv') LIMIT 5;

-- Aggregate straight from a Parquet file
SELECT region, sum(amount) AS total
FROM 'transactions.parquet'
GROUP BY region ORDER BY total DESC;

-- Query every Parquet file in a directory at once
SELECT count(*) FROM 'data/*.parquet';

DuckDB infers column names and types automatically, so exploratory analysis is immediate.

Importing, Exporting and Converting

DuckDB is an excellent format converter because it reads and writes CSV, Parquet, and JSON natively:

-- Load a CSV into a real table
CREATE TABLE sales AS SELECT * FROM read_csv_auto('sales.csv');

-- Export a query result to Parquet
COPY (SELECT * FROM sales WHERE amount > 100)
TO 'big_sales.parquet' (FORMAT parquet);

Extensions

DuckDB’s capabilities extend through installable extensions. For example, httpfs lets you query remote files:

INSTALL httpfs;
LOAD httpfs;

-- Query a Parquet file directly over HTTPS
SELECT count(*)
FROM 'https://example.com/data/events.parquet';

Other popular extensions include json, parquet, spatial, and fts for full-text search.

Keeping DuckDB Updated

As a managed package, DuckDB updates with your normal maintenance:

sudo apt update && sudo apt upgrade

This keeps the duckdb binary current alongside the rest of your Debian system.

Other Tools from deb.griffo.io

The repository packages many complementary tools for Debian:

  • yq — a portable YAML, JSON, and XML processor for config data
  • Nushell — a shell built around structured, tabular data
  • fzf — a fuzzy finder for picking files and query snippets
  • just — a command runner for saving common analysis tasks

Troubleshooting

GPG or Key Errors

If APT reports the repository is not signed, re-add the key:

sudo install -d -m 0755 /etc/apt/keyrings
curl -fsSL https://deb.griffo.io/EA0F721D231FDD3A0A17B9AC7808B4DD62C41256.asc | sudo gpg --dearmor --yes -o /etc/apt/keyrings/deb.griffo.io.gpg
sudo apt update

Package Not Found

If APT cannot find duckdb:

  1. Run sudo apt update again to refresh the index
  2. Confirm your release is supported (Bookworm, Trixie, or Sid)
  3. Inspect the source entry: cat /etc/apt/sources.list.d/deb.griffo.io.list

Extension Fails to Install

Extensions are downloaded on first use, so INSTALL httpfs; needs network access. If it fails behind a proxy or an offline host, confirm outbound HTTPS works and set your proxy environment variables before launching DuckDB:

export HTTPS_PROXY=http://proxy.internal:3128
duckdb

You can also see which extensions are installed and loaded by querying duckdb_extensions():

SELECT extension_name, installed, loaded FROM duckdb_extensions();

Uninstalling

To remove DuckDB:

sudo apt remove duckdb

To remove the repository as well:

sudo rm /etc/apt/sources.list.d/deb.griffo.io.list
sudo rm /etc/apt/keyrings/deb.griffo.io.gpg
sudo apt update

Any .duckdb database files you created remain on disk until you delete them.

Conclusion

DuckDB packs a serious analytical SQL engine into a single, dependency-free binary that queries your data files where they sit. For exploring CSVs, crunching Parquet, or converting between formats, the DuckDB shell is hard to beat. On Debian, the deb.griffo.io repository turns installation into apt install duckdb and rolls updates into your usual apt upgrade.

Install it, launch duckdb, and point a SELECT at one of your data files. The first time you run an aggregation straight over a Parquet directory with no setup, its appeal becomes obvious.

Resources


Disclaimer: The deb.griffo.io repository is an unofficial community project and is not affiliated with the official Debian or Ubuntu projects, or with the upstream DuckDB project.