How to Install Anaconda in Ubuntu or Debian

3 min

A simple tutorial to install the Anaconda package in Ubuntu or in Debian Linux.

Anaconda is an essential platform for handling data science and machine learning workflows. With over 7500 scientific packages, it’s the ideal solution for processing large-scale data, predictive analysis, and scientific computing. Anaconda takes care of the installation of these packages and their dependencies, saving you the hassle of doing it yourself. Moreover, it provides an integrated Python environment, making it the go-to choice for anyone serious about data science and machine learning.

In this article, you will learn how to install Anaconda in Ubuntu or Debian Linux. It is tested on the latest version of Debian 12 and Ubuntu Linux.

How to install Anaconda in Ubuntu or Debian

Follow the step-by-step instructions below.


Open a terminal window (CTRL+ALT+T) and run the following command to ensure your system is up-to-date.

sudo apt update && sudo apt upgrade -y

For this installation, we need to download the official installer from the website. Visit the below page and download the Anaconda installer script.

Downloading Anaconda from official website
Downloading Anaconda from official website

Installing Anaconda

Go to the downloads directory and install it using the following bash command. You can change the file name and your downloads folder for your system.

Starting Anaconda installation
Starting Anaconda installation

Hit enter and press “q”. Then type “yes” to accept the terms (if you want!).

Accept Anaconda terms
Accept Anaconda terms

The installer will ask for a default folder for installation. It will assume the default location in your home as shown below image. If you are fine with the location press Enter or specify a location as instructed.

Default installation directory
Default installation directory

Wait for a few moments for the installer to execute the steps.

Installation of Anaconda is in progress
Installation of Anaconda is in progress

If you see the following message, that means Anaconda is installed in Debian or Ubuntu systems. The installer will ask you to init the conda executable. Type yes and press enter.

Installation is complete
Installation is complete

As you can see the installation is complete and the installer has modified the .bashrc file.

You need to recompile bashrc to make the change visible.

Updated bashrc
Updated bashrc
source ~/.bashrc

Verify the installation

Verify the installation using the “conda list” command. It will list the packages in your conda environment.

conda list

Alternatively, you can also run the following command to ensure that the installation is correct.

conda --version

As you can see below, in my test system the Anaconda installation is successful.

Verifying installation
Verifying installation

Removing Anaconda

If you want to uninstall Anaconda, simply remove the default installation directory as shown via the below command.

rm -rf ~/anaconda3

Finally, open the .bashrc file and remove (or comment) the last portion in that file which was added by the installer. Then restart your system.

Closing notes

To install Anaconda in Ubuntu or in Debian, download the Anaconda installer file from the official website. Then install the installer script and verify using “conda list” or “conda –version” commands. I hope this write-up helps you with installing Anaconda in Debian or Ubuntu Linux.


Creator and author of Connect with me via Telegram, 𝕏 (Twitter), or send us an email.
Notify of

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Inline Feedbacks
View all comments