216

Is there a way (using conda update) that I can list outdated packages and select or bulk update (compatible) packages in Anaconda?

It doesn't make much sense updating the packages individually as there are hundreds of them.

Jean-François Corbett
  • 37,420
  • 30
  • 139
  • 188
Afloz
  • 3,625
  • 3
  • 25
  • 31

4 Answers4

358

You want conda update --all.

conda search --outdated will show outdated packages, and conda update --all will update them (note that the latter will not update you from Python 2 to Python 3, but the former will show Python as being outdated if you do use Python 2).

asmeurer
  • 86,894
  • 26
  • 169
  • 240
  • Thanks for the answer. I use python 2. Is it possible to filter the outdated for a particular installed version(py27_0)? does `conda update all` updates only compatible version for my py27 environment? – Afloz Jul 27 '14 at 23:39
  • Yes, `conda update --all` will only install packages that are compatible with one another, and it will not update you from Python 2 to Python 3. – asmeurer Jul 28 '14 at 16:52
  • Don't forget to add _conda_ to your path, `export PATH=~/anaconda/bin:$PATH` – tashuhka Apr 21 '15 at 11:53
  • 10
    `conda search --outdated` shows you all the available versions of each installed AND outdated package, that is a bit too much in many cases,,, Personally I prefer to use `conda update --all`, that shows what's going to be installed and prompts for confirmation: you reply `N` and you have a compact list of outdated packages. – gboffi Aug 14 '15 at 09:43
  • 4
    `conda update --all` also differs from `conda search --outdated` in that it runs through the solver, meaning some packages that have newer versions may not be updated if other packages have dependency restrictions (or, for example, `conda update --all` won't update from Python 2.7 to Python 3.4). – asmeurer Aug 14 '15 at 18:59
  • I got an error message for packages having unsatisfiable dependencies when trying `conda update --all` but `conda update anaconda` did the job. – robsn Dec 08 '15 at 08:34
  • I might be wrong, but isn't it better to stick with the latest version of the anaconda **meta package**? If you install any package to a version higher than what the anaconda meta package has, your anaconda meta package version will be changed to `custom-py36_0` (assuming Python 3.6). Unless you have a very good reason to manually update one specific package or another, I don't think `conda update --all` is good practice, and `conda upgrade anaconda` should be used instead. – Gustavo Bezerra Mar 15 '17 at 06:05
  • is running command line `conda update anaconda` (or `conda update --all`) the same as updating packages in Anaconda Navigator -> Environments -> selecting Upgradable and manually applying upgrades? Thanks. – Celdor Apr 21 '17 at 08:23
  • I have also come across `conda update conda`. Is it the same as `conda update anaconda`? – Celdor Apr 21 '17 at 08:32
  • 1
    I have just found [this blog](https://jakevdp.github.io/blog/2016/08/25/conda-myths-and-misconceptions/) where author Jake VanderPlas gives some term explanations regarding _Anaconda_ and `conda`. It answered many questions I had. – Celdor Apr 21 '17 at 10:01
15

Before you proceed to conda update --all command, first update conda with conda update conda command if you haven't update it for a long time. It happent to me (Python 2.7.13 on Anaconda 64 bits).

Adam Batkin
  • 51,711
  • 9
  • 123
  • 115
thanvaf
  • 329
  • 3
  • 7
2

the Conda Package Manager is almost ready for beta testing, but it will not be fully integrated until the release of Spyder 2.4 (https://github.com/spyder-ide/spyder/wiki/Roadmap). As soon as we have it ready for testing we will post something on the mailing list (https://groups.google.com/forum/#!forum/spyderlib). Be sure to subscribe

Cheers!

goanpeca
  • 546
  • 2
  • 7
1
# list packages that can be updated
conda search --outdated

# update all packages prompted(by asking the user yes/no)
conda update --all

# update all packages unprompted
conda update --all -y
Naveen Reddy Marthala
  • 2,622
  • 4
  • 35
  • 67