Anaconda is a versatile platform used as an environment manager, a package manager, and a distribution of R and Python programming languages. It is used for tasks related to data science, scientific computing, machine learning, large-scale data processing, and more. With Anaconda, you will be able to install, run, and update complex data science and machine learning tools and libraries. Further, it also allows you to create an isolated environment based on a specific Python version. Thus, it helps you maintain project dependencies and avoid conflicts.
In this guide, you will learn :
- How to Install Anaconda on Ubuntu 24.04
- How to Use Anaconda on Ubuntu 24.04
- How to Update Anaconda on Ubuntu 24.04
- How to Remove Anaconda on Ubuntu 24.04
- Conclusion
How to Install Anaconda on Ubuntu 24.04
You can install Anaconda on Ubuntu 24.04 by using the following steps:
Step 1: Download Anaconda Script
First, open the Firefox browser on Ubuntu and navigate to the official Anaconda download page. Select the 64-bit (x86) Installer option under the Linux category. It will begin downloading the latest script file on your Ubuntu system.

Alternatively, you can also use the wget command followed by the URL for the latest Anaconda script file to download it on your system. The latest Anaconda script file at the time of writing this article can be downloaded on Ubuntu from the following command:
wget https://repo.anaconda.com/archive/Anaconda3-2024.02-1-Linux-x86_64.sh
Step 2: Execute the Anaconda Script
Once the system downloads the Anaconda script, you can run the script on the terminal using the bash command followed by the script name:
bash Anaconda3-2024.02-1-Linux-x86_64.sh
When you execute the script, it will provide you with the Welcome prompt. The script will need your permission to review the license agreement, simply, press the Enter button to start reviewing the license agreement.
The license agreement script of Anaconda is too long. You can review it or press the Enter or Space button multiple times until you see the prompt asking you to accept the license terms. You can accept the license terms by using the yes option:
Once you accept the terms, another prompt will appear asking you the location to install Anaconda on Ubuntu. You can go with the default location by simply press the Enter button:
The script will then begin installing the Anaconda on Ubuntu:
The installation may take some minutes and in the final prompt, you will be asked whether to activate the Conda base environment at the terminal startup. Simply use the yes option and complete the Anaconda installation on Ubuntu.
At this stage, Anaconda has been successfully installed on the Ubuntu 24.04 system. To confirm it, close the terminal and open it again, you will see the base Conda environment is activated. It ensures that Anaconda is running on your system.
How to Use Anaconda on Ubuntu 24.04
You can use Anaconda on Ubuntu 24.04 to create a new isolated environment for running Python projects on your system. By default, Anaconda automatically sets the base environment at the startup. However, you can disable the base environment to run at the startup using the following command:
conda config --set auto_activate_base false
Note: The changes will be applied when you close the terminal and open it again.
You can verify the packages that come with the default base environment of Anaconda by using the following command:
conda list
For creating a separate virtual environment through Anaconda, specify the Python version to be used with the created environment. You can create a new isolated environment on Ubuntu through Anaconda by using the following syntax:
conda create --name env_name python=3
Don’t forget to replace env_name with the environment you want to create for running Python projects on the system. Here, we have created a virtual environment myenv that uses the default Python3 version on Ubuntu:
During the installation, it will ask for confirmation to download and extract Python packages in the environment. Allow the installation of packages by entering the y option:
To activate your created virtual environment on Ubuntu, you can use the conda activate command followed by the environment name:
conda activate env_name
Here, we activated the myenv environment on Ubuntu that was created earlier.
To test whether the virtual environment is running successfully, we are installing a Python package through pip:
pip3 install scipy
The above command will begin installing the Python package in an isolated environment. It also helps you in fixing the externally managed environment.
You can deactivate the environment by simply using the following command:
conda deactivate
At first execution, it will deactivate the created environment. If you use the command again, it will deactivate the base environment and the terminal will roll back to its original settings.
How to Update Anaconda on Ubuntu 24.04
You can update Anaconda only if you have installed its meta package into an existing Conda environment. If it’s not, you first need to install it using the following command:
conda install anaconda
Then use the conda update command to first update Conda on your system:
conda update conda
After that, you can update the Anaconda meta package in case of any update available by running the following command:
conda update anaconda
How to Remove Anaconda from Ubuntu 24.04
To remove Anaconda, you should install the anaconda-clean module that will remove your configuration files from the system. You can install anaconda-clean module using the following command:
conda install anaconda-clean -y
Then use the anaconda-clean command followed by the -y flag to approve the removal of configuration files:
anaconda-clean -y
Once done, you can remove the main Anaconda directory from the system using the following command:
sudo rm -rf anaconda3
Conclusion
Anaconda is a robust platform that simplifies package management and deployment for machine learning and data science tasks. Today, we have demonstrated the steps to install Anaconda on Ubuntu 24.04 using a script from its official site. For that, first, script is downloaded, then the bash command to run the script, and complete the installation. After that, we used the conda command to create a separate virtual environment and install packages to avoid conflicts.
Apart from that, we have also discussed the method to update Anaconda or remove it from the system to free up the disk space on Ubuntu. Following this will help you install and start working with Anaconda on your Ubuntu system.

