Skip to main content

Install

To install Ollama, run the following command:

Manual install

If you are upgrading from a prior version, you should remove the old libraries with sudo rm -rf /usr/lib/ollama first.
Download and extract the package:
Start Ollama:
In another terminal, verify that Ollama is running:

AMD GPU install

If you have an AMD GPU, also download and extract the additional ROCm package:

ARM64 install

Download and extract the ARM64-specific package:
Create a user and group for Ollama:
Create a service file in /etc/systemd/system/ollama.service:
Then start the service:

Install CUDA drivers (optional)

Download and install CUDA. Verify that the drivers are installed by running the following command, which should print details about your GPU:

Install AMD ROCm drivers (optional)

Download and Install ROCm v7.

Start Ollama

Start Ollama and verify it is running:
While AMD has contributed the amdgpu driver upstream to the official linux kernel source, the version is older and may not support all ROCm features. We recommend you install the latest driver from https://www.amd.com/en/support/linux-drivers for best support of your Radeon GPU.

Customizing

To customize the installation of Ollama, you can edit the systemd service file or the environment variables by running:
Alternatively, create an override file manually in /etc/systemd/system/ollama.service.d/override.conf:

Updating

Update Ollama by running the install script again:
Or by re-downloading Ollama:

Installing specific versions

Use OLLAMA_VERSION environment variable with the install script to install a specific version of Ollama, including pre-releases. You can find the version numbers in the releases page. For example:

Viewing logs

To view logs of Ollama running as a startup service, run:

Uninstall

Remove the ollama service:
Remove ollama libraries from your lib directory (either /usr/local/lib, /usr/lib, or /lib):
Remove the ollama binary from your bin directory (either /usr/local/bin, /usr/bin, or /bin):
Remove the downloaded models and Ollama service user and group: