How to remove Anaconda3 from Kali Linux (Linux / CentOS / Ubuntu / Windows / macOS, etc.)

Problem

We want completely Anaconda3 from Kali Linux or any other system.

Correction

1 Kali Linux / Linux / Ubuntu / Debian / CentOS, etc.

1.1 Starting the terminal

1.2 Run the command to uninstall Anaconda3

1.2.1 Option 1

sudo rm -rf ~/anaconda3

1.2.1.1 Enter the password of the current user if asked.

1.2.1.2 Wait 10-20 seconds

1.2.1.3 Exit Terminal

1.2.1.4 It should be removed now

1.2.2 Options 2

conda install anaconda-clean
anaconda-clean
anaconda-clean --yes

Note: anaconda-clean will create a backup of all files and directories that might be deleted in a folder named .anaconda_backup in your home directory. Also note that Anaconda-Clean leaves your data files in the AnacondaProjects directory intact.

1.3 Removing entries from ~ /.bashrc or ~ /.bash_profile

1.3.1 For Kali Linux

1.3.1.1 Edit .bashrc file

sudo nano ~/.bashrc

1.3.1.2 Find a line like # >>> conda initialize >>> (Usually at the bottom of the file)

Remove anything between the following lines inclusive

# >>> conda initialize >>>
...
# <<< conda initialize <<<

1.3.1.3 Save and close the editor. Ctrl + X, Y, Enter key

1.3.2 For other Linux distributions

1.3.2.1 Edit .bash_profile file

sudo nano ~/.bash_profile

1.3.2.2 Find a line similar to

export PATH="/Users/test/anaconda3/bin:$PATH"

1.3.2.3 Delete the line, then use Ctrl + X, Y, Enter key to save and exit.

2 Windows

2.1 Removing envs and pkgs folders from Anaconda3 root installation folder

2.2 Remove Anaconda3 from Windows Control Panel

2.2.1 Launching the “Run” window using the keyboard shortcut Win + R

2.2.2 Type appwiz.cpl and press the Enter key to open the Add / Remove Programs window in the Control Panel.

2.2.3 Find Anaconda3, uninstall it

3 macOS

3.1. Delete anaconda2, anaconda3 folder or ~ / opt from Finder application or from terminal (for example rm -rf ~ / anaconda3)

Sidebar