Install Dart SDK on Ubuntu

Deepak Prasad
Tested on Ubuntu 26.04 LTS (Resolute Raccoon)
Package dart 3.13.5-1 (stable, amd64)
Applies to Ubuntu 26.04 LTS and 24.04 LTS; official Dart APT repo also supports arm64, armhf, and riscv64 when you set arch= to match dpkg --print-architecture
Privilege sudo or root for APT and .deb installs
Scope Install the Google Dart SDK from the official APT repository on Ubuntu, verify the version, run a Hello World program, upgrade and uninstall, and optional manual .deb install. Does not cover Debian-only install write-ups or a full Flutter SDK setup.
Related guides apt command
dpkg command
wget command
Check Ubuntu version
Short on time?Beta Get the gist of this 8-minute read in seconds, then ask follow-up questions

This guide installs the current stable Dart SDK on Ubuntu 26.04 and 24.04 using Google’s official APT repository. You will confirm dart --version, run a short Hello World program, and see when a separate Dart install is unnecessary because Flutter already ships the Dart SDK.

The steps match Dart’s package-manager install documentation. They are not the same as DART (Dynamic Animation and Robotics Toolkit) robotics software, which is a different project entirely.


Quick answer

The recommended way to install the Google Dart SDK on Ubuntu is to add the official Dart APT repository and install the dart package.

If you already installed Flutter for mobile or desktop apps, you usually do not need a standalone Dart SDK—Flutter bundles a compatible Dart toolchain.

This walkthrough was captured on Ubuntu 26.04 LTS; the same repository layout applies to Ubuntu 24.04 LTS.

Item Value
Recommended method Official Dart APT repository → dart package
Verify dart --version
Flutter users Install Flutter only; skip separate Dart unless you need a different SDK channel
Architectures Set arch= in the repo line to amd64, arm64, armhf, or riscv64

Before you install Dart

Dart SDK vs Flutter SDK

Before installing Dart separately, check whether you actually need the standalone SDK:

                ┌────────────────────────┐
                │ What are you building? │
                └────────────┬───────────┘
                             │
          ┌──────────────────┴──────────────────┐
          │                                     │
┌─────────▼───────────┐              ┌──────────▼──────────┐
│ Standalone Dart     │              │ Flutter application │
│                     │              │                     │
│ CLI tools           │              │ Mobile UI           │
│ Server applications │              │ Web UI              │
│ Non-Flutter projects│              │ Desktop UI          │
└─────────┬───────────┘              └─────────┬───────────┘
          │                                    │
┌─────────▼───────────┐              ┌─────────▼───────────┐
│ Install Dart SDK    │              │ Install Flutter SDK │
│ using this guide    │              │                     │
└─────────────────────┘              └─────────┬───────────┘
                                               │
                                     ┌─────────▼────────────┐
                                     │ Dart SDK is already  │
                                     │ included with Flutter│
                                     └──────────────────────┘

If you are building standalone Dart applications, continue with Install Dart SDK on Ubuntu with APT. For Flutter applications, install Flutter on Linux instead; Flutter already includes a compatible Dart SDK.

If the APT repository is not suitable for your environment, see install Dart from a DEB package.

Supported Ubuntu versions and architectures

Dart publishes one Debian-format repository for Ubuntu and Debian. On Ubuntu 26.04 and 24.04, add that repository and install dart the same way.

Before you write the deb line, check your CPU architecture:

bash
dpkg --print-architecture
output
amd64

Use that value in the arch= field of the repository entry. Official builds support amd64, arm64, armhf, and riscv64—substitute your dpkg --print-architecture result instead of copying amd64 blindly on ARM or RISC-V boards.

Confirm your release with check Ubuntu version if you are unsure whether you are on 24.04 or 26.04.


Install Dart SDK on Ubuntu with APT

Install required packages

Google’s Dart repository uses HTTPS and a dedicated signing key. Install the packages used by Dart’s official repository instructions:

bash
sudo apt update

Refresh indexes first, then install apt-transport-https, wget, and gpg:

bash
sudo apt install -y apt-transport-https wget gpg

Add the Dart signing key

Import Google’s signing key into /usr/share/keyrings/dart.gpg so APT can verify packages from storage.googleapis.com:

bash
wget -qO- https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo gpg --dearmor -o /usr/share/keyrings/dart.gpg

wget exits quietly on success. See the wget command reference if you prefer curl with equivalent flags.

Add the official Dart repository

Replace amd64 below if dpkg --print-architecture returned something else:

bash
sudo tee /etc/apt/sources.list.d/dart_stable.list <<EOF
deb [signed-by=/usr/share/keyrings/dart.gpg arch=amd64] https://storage.googleapis.com/download.dartlang.org/linux/debian stable main
EOF

Package installs and upgrades on this path use the apt command workflow like any other signed repository.

Install the Dart SDK

Refresh indexes so APT sees the new repository, then install the SDK package:

bash
sudo apt update

Install the SDK package from the Dart stable channel:

bash
sudo apt install -y dart

APT installs the current stable Dart SDK published in Google’s Dart repository (for example 3.13.5-1 at the time this page was tested).

Verify the installed Dart version

Print the SDK build and platform string:

bash
dart --version
output
Dart SDK version: 3.13.5 (stable) (Tue Sep 29 01:00:52 2026 -0700) on "linux_x64"

Your version may be newer than this example; the repository remains on the stable channel unless you change it.


Test Dart with a Hello World program

Create a small file, run it with the dart command, and confirm the runtime works end to end:

bash
mkdir -p ~/dart-hello && cd ~/dart-hello

Write a one-line Hello World program:

bash
cat <<'EOF' > hello.dart
void main() {
  print('Hello, World!');
}
EOF

Run the script with the VM:

bash
dart hello.dart
output
Hello, World!

If you see Hello, World!, Dart is installed correctly and can run programs from your shell.

NOTE
Do not confuse dart install with installing the Dart SDK. After the SDK is present, dart install pulls Dart CLI tools/packages globally—it does not replace APT or a .deb for the SDK itself.

Optional: install Dart from a DEB package

APT is still the better default because sudo apt upgrade keeps the SDK current. Use the .deb method when you need a specific downloaded version or cannot use the repository.

When manual DEB installation makes sense

  • You downloaded a particular stable .deb from Get Dart and want that exact file on disk.
  • You cannot use the APT repository in a given environment but still have sudo for dpkg.

Installing a .deb with sudo dpkg -i requires root, same as APT. It is not a rootless install path.

Download the Dart DEB package

Open the official Get Dart page and download the Linux Debian package that matches your architecture.

The filename follows this pattern:

text
dart_<version>-1_<architecture>.deb

For example:

text
dart_3.13.5-1_amd64.deb

Install the downloaded package

Dart’s official instructions use dpkg. Install the file you downloaded (replace the name with yours):

bash
sudo dpkg -i dart_3.13.5-1_amd64.deb

You can also use the generic form dart_<version>-1_<architecture>.deb when scripting or documenting a version you have not pinned yet.

If dpkg reports missing dependencies, run sudo apt -f install once to satisfy them, then check dart --version again.


Upgrade Dart on Ubuntu

When Dart was installed from the official repository, refresh indexes and upgrade like any other package:

bash
sudo apt update

Apply the newest stable dart package from the repository:

bash
sudo apt install -y dart

apt install dart on an already-installed system upgrades to the newest stable build in the repository.


Uninstall Dart completely

Remove the SDK package:

bash
sudo apt purge -y dart

Remove unused dependencies left after the purge:

bash
sudo apt autoremove -y

Drop the repository and signing key if you will not reinstall from APT:

bash
sudo rm -f /etc/apt/sources.list.d/dart_stable.list /usr/share/keyrings/dart.gpg

Refresh APT so it stops querying the removed Dart repository:

bash
sudo apt update

Optionally remove Dart user configuration under your home directory if you want a completely clean reinstall; deleting ~/.dart is not required to uninstall the SDK package.

For broader package cleanup patterns, see how to remove software on Ubuntu.


Troubleshooting

Symptom Likely cause Fix
dart: command not found SDK not installed or shell PATH not refreshed Run sudo apt install -y dart, open a new terminal, or hash -r
apt update shows no Dart packages Wrong arch= in dart_stable.list Set arch= to dpkg --print-architecture and run sudo apt update again
GPG or signed-by errors Missing or corrupt /usr/share/keyrings/dart.gpg Re-run the wget | gpg --dearmor key import, then sudo apt update
Conflicting values set for option Signed-By Duplicate or older Dart repository entries Remove extra Dart deb lines (keep one dart_stable.list with signed-by=/usr/share/keyrings/dart.gpg), then sudo apt update
Version stuck on an old release Repository file removed or apt cache stale Confirm dart_stable.list exists, run sudo apt update, then sudo apt install --only-upgrade dart

Summary

You can install the Google Dart SDK on Ubuntu 26.04 and 24.04 by adding the official Dart APT repository, importing the signing key, and installing the dart package. Using the repository also lets APT update Dart later, so you do not need to download a new .deb for each release.

Check dpkg --print-architecture before you set arch= in the repository line so amd64, arm64, armhf, and riscv64 hosts pull the correct packages. Run dart --version and a one-file Hello World program to confirm the toolchain works. If your goal is Flutter, install Flutter instead of duplicating the Dart SDK unless you deliberately need a separate SDK channel.

Optional .deb installs remain available from Get Dart when you need a specific downloaded build, but APT is the maintenance-friendly default for most Ubuntu desktops and servers.


References


Frequently Asked Questions

Do I need to install Dart if I already have Flutter?

Usually no. A Flutter SDK install includes a matching Dart SDK. Install standalone Dart only when you are building non-Flutter Dart projects or you need a different SDK setup than Flutter provides.

Does Dart support Ubuntu 26.04?

Yes. Google publishes the same Debian-format repository used on Ubuntu 24.04 and 26.04. This guide was tested on Ubuntu 26.04 LTS with Dart 3.13.5 from the stable channel.

Can I install Dart on ARM64 Ubuntu?

Yes, when official packages exist for your architecture. Set arch=arm64 (or armhf / riscv64 where supported) in dart_stable.list to match dpkg --print-architecture, then run sudo apt update and sudo apt install dart.

How do I update the Dart SDK?

For APT installs, run sudo apt update and sudo apt install dart (or sudo apt upgrade to upgrade all packages). That pulls the latest stable build from the Dart repository.

Finished reading?Beta Get the key takeaways in seconds, then ask follow-up questions
Omer Cakmak

Linux Administrator

Highly skilled at managing Debian, Ubuntu, CentOS, Oracle Linux, and Red Hat servers. Proficient in bash scripting, Ansible, and AWX central server management, he handles server operations on OpenStack, KVM, Proxmox, and VMware.

  • Debian
  • Ubuntu
  • Linux
  • Red Hat Enterprise Linux
  • Shell Script
  • System Administration