Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/conda/conda/llms.txt

Use this file to discover all available pages before exploring further.

What is .condarc

The .condarc file is conda’s configuration file where you can specify settings that modify conda’s behavior. It’s written in YAML format and allows you to customize channels, environment directories, package caching, network settings, and much more. The name “condarc” stands for “conda run command” configuration file. Think of it as conda’s personal preferences file that persists across all conda operations.

File Locations and Precedence

Conda searches for .condarc files in multiple locations and merges them with a specific precedence order:
1

Command-line arguments

Highest priority - flags passed directly to conda commands
2

Environment variables

Settings prefixed with CONDA_ (e.g., CONDA_CHANNELS)
3

Environment .condarc

Located at $CONDA_PREFIX/.condarc in the active environment
4

User .condarc

Located at ~/.condarc (Linux/macOS) or %USERPROFILE%\.condarc (Windows)
5

System .condarc

Located at $CONDA_ROOT/.condarc in the conda installation directory
Settings in higher-priority locations override those in lower-priority locations. You can view all configuration sources and their values with:
conda config --show-sources

Common Configuration Options

Here are the most frequently used .condarc settings:

Channels

Control where conda searches for packages:
channels:
  - conda-forge
  - defaults

channel_priority: flexible  # or 'strict' or 'disabled'
channels
list
List of channels to search for packages. Channels earlier in the list have higher priority.
channel_priority
string
default:"flexible"
How strictly conda respects channel priority:
  • strict: Only use packages from highest-priority channel
  • flexible: Allow mixing packages from different channels
  • disabled: Ignore channel priority, use latest version
channel_alias
string
default:"https://conda.anaconda.org"
Base URL for channel names that don’t include a full URL.

Environment and Package Directories

envs_dirs:
  - ~/my-envs
  - ~/miniconda3/envs

pkgs_dirs:
  - ~/my-packages
  - ~/miniconda3/pkgs
envs_dirs
list
Directories to search for named environments. New environments are created in the first writable directory.
pkgs_dirs
list
Directories for package caches. Downloaded packages are stored in the first writable directory.

Solver Settings

solver: libmamba  # or 'classic'

aggressive_update_packages:
  - ca-certificates
  - certifi
  - openssl
solver
string
default:"classic"
Which solver backend to use. libmamba is faster, classic is the traditional conda solver.

Network and Security

ssl_verify: true  # or false, or path to CA bundle

proxy_servers:
  http: http://proxy.example.com:8080
  https: https://proxy.example.com:8080

remote_connect_timeout_secs: 9.15
remote_read_timeout_secs: 60.0
ssl_verify
boolean | string
default:"true"
Verify SSL certificates. Can be true, false, a path to a CA bundle, or 'truststore' to use OS certificates.

User Experience

auto_activate: true
changeps1: true
env_prompt: '({name}) '
always_yes: false
quiet: false
auto_activate
boolean
default:"true"
Automatically activate the base environment when starting a new shell.
changeps1
boolean
default:"true"
Modify the command prompt to show the active environment name.

Configuration Examples

Basic User Configuration

A typical ~/.condarc for a data scientist:
channels:
  - conda-forge
  - defaults

channel_priority: flexible

auto_activate: true
changeps1: true

create_default_packages:
  - pip
  - ipython

Corporate Environment

Configuration for working behind a corporate firewall:
channels:
  - https://repo.company.com/conda/main
  - defaults

ssl_verify: /path/to/company-ca-bundle.crt

proxy_servers:
  http: http://proxy.company.com:8080
  https: http://proxy.company.com:8080

remote_connect_timeout_secs: 30
remote_read_timeout_secs: 120

CI/CD Pipeline

Settings optimized for automated builds:
always_yes: true
quiet: true

safety_checks: disabled
rollback_enabled: false

default_threads: 4

Managing Your .condarc

Viewing Configuration

See all active settings:
conda config --show
See settings from all configuration files:
conda config --show-sources
Get help for a specific parameter:
conda config --describe channel_priority

Modifying Configuration

Add a channel:
conda config --add channels conda-forge
Set a boolean or string value:
conda config --set channel_priority strict
Remove a channel:
conda config --remove channels defaults
Remove a key entirely:
conda config --remove-key channels

Configuration Scopes

Modify different configuration files:
# User configuration (default)
conda config --set always_yes true

# System-wide configuration
conda config --system --set always_yes true

# Current environment only
conda config --env --set always_yes true

# Specific file
conda config --file /path/to/.condarc --set always_yes true

Validation

Validate all .condarc files for syntax errors:
conda config --validate
This checks all configuration sources for parsing errors and reports any issues found.

See Also