RUNLOCALAIv38
->Will it run?Best GPUCompareTroubleshootStartLearnPulseModelsHardwareToolsBench
Run check
RUNLOCALAI

Independently operated catalog for local-AI hardware and software. Hand-written verdicts. Source-cited claims. Reproducible commands when we have them.

OP·Eruo Fredoline
DIR
  • Models
  • Hardware
  • Tools
  • Benchmarks
TOOLS
  • Will it run?
  • Compare hardware
  • Cost vs cloud
  • Choose my GPU
  • Prompting kits
  • Quick answers
REF
  • All buyer guides
  • Learn local AI
  • Methodology
  • Glossary
  • Errors KB
  • Trust
EDITOR
  • About
  • Author
  • How we make money
  • Editorial policy
  • Contact
LEGAL
  • Privacy
  • Terms
  • Sitemap
MAIL · MONTHLY DIGEST
Get monthly local AI changes
Monthly recap. No spam.
DISCLOSURE

Some links on this site are affiliate links (Amazon Associates and other first-class retailers). When you buy through them, we earn a small commission at no extra cost to you. Affiliate links do not influence our verdicts — there are cards we rate highly that we don't have affiliate relationships with, and cards that sell well that we refuse to recommend. Read more →

© 2026 runlocalai.coIndependently operated
RUNLOCALAI · v38
  1. >
  2. Home
  3. /Learn
  4. /Courses
  5. /Ollama — Installation to Mastery
  6. /Ch. 20
Ollama — Installation to Mastery

20. Model Download Failures

Chapter 20 of 20 · 20 min
KEY INSIGHT

Download failures are usually network-related. Check connectivity first, then disk space, then clear corrupted caches. As a last resort, import models manually from GGUF files.

Downloads fail due to network issues, disk space problems, corrupted caches, or registry errors. This chapter covers diagnosing and resolving download failures.

Symptoms

  • ollama pull hangs or times out
  • Error: failed to pull model message
  • Incomplete downloads on retry
  • "file too short" errors

Network Issues

Check connectivity:

curl -I https://ollama.com

If this fails, check your network configuration, proxy settings, or firewall rules.

Proxy configuration:

# Linux/macOS
export HTTPS_PROXY=http://proxy.example.com:8080
export HTTP_PROXY=http://proxy.example.com:8080
ollama pull llama3.2:1b

# Windows PowerShell
$env:HTTPS_PROXY = "http://proxy.example.com:8080"
$env:HTTP_PROXY = "http://proxy.example.com:8080"
ollama pull llama3.2:1b

Timeout settings:

export OLLAMA_CONNECT_TIMEOUT=120
ollama pull llama3.2:1b

Disk Space

Verify available space:

# Linux/macOS
df -h ~/.ollama

# Windows PowerShell
Get-PSDrive C | Select-Object Used,Free

Models can require 2-20 GB of disk space. Free up space or point to a larger drive:

# Linux/macOS - use different directory
export OLLAMA_MODELS=/mnt/large-drive/ollama-models
ollama pull llama3.2:1b

# Windows PowerShell
$env:OLLAMA_MODELS = "D:\\ollama-models"
ollama pull llama3.2:1b

Corrupted Cache

Manifests and partial downloads can corrupt. Clear the cache:

# Stop all running models
ollama stop llama3.2:1b

# Remove the specific model
ollama rm llama3.2:1b

# Clear manifest cache
rm -rf ~/.ollama/models/manifests/registry.ollama.ai/library/llama3.2@*

# Retry download
ollama pull llama3.2:1b

On Windows:

ollama stop llama3.2:1b
ollama rm llama3.2:1b
Remove-Item -Recurse -Force "$env:USERPROFILE\\.ollama\\models\\manifests\\registry.ollama.ai\\library\\llama3.2@*"
ollama pull llama3.2:1b

Registry Errors

If Ollama's registry is unreachable, try an alternative:

# Use a mirror (if available)
export OLLAMA_REGISTRY=https://mirror.example.com
ollama pull llama3.2:1b

Alternatively, download model files manually and import them:

# Import a GGUF file
ollama create llama3.2:1b -f ./Modelfile

Where the Modelfile specifies the local path:

FROM ./llama3.2-1b-q4_k_m.gguf

Retry Logic Script

#!/bin/bash
MODEL=$1
MAX_RETRIES=5
RETRY_DELAY=30

for i in $(seq 1 $MAX_RETRIES); do
    echo "Attempt $i of $MAX_RETRIES: Pulling $MODEL"
    if ollama pull "$MODEL" 2>&1; then
        echo "Success"
        exit 0
    fi
    echo "Failed. Waiting $RETRY_DELAY seconds..."
    sleep $RETRY_DELAY
done

echo "Failed after $MAX_RETRIES attempts"
exit 1

Verifying Downloads

After a successful pull, verify the model:

ollama list
ollama show llama3.2:1b

The show command displays model metadata and file locations. If the model appears but fails to run, the download may be incomplete.

EXERCISE

Simulate a download failure by setting an invalid proxy (export HTTPS_PROXY=http://invalid:8080), then retry with correct settings. Verify the cache cleanup process works correctly.

← Chapter 19
Slow Inference Debugging
Course complete →
Browse all courses