# Update old release of Ubuntu after end of life to newer one

## Problem

I recently wanted to update my Raspberry Pi 4B where i had Ubuntu 21.04 (which reached end of life) to Ubuntu 22.04. But I couldn't use `apt update` because it couldn't find repositories.

## Solution

1. Make copy of `/etc/apt/sources.list` (for backup)
    
2. Change every `http://ports.ubuntu.com/ubuntu-ports/`, `http://archive.ubuntu.com/ubuntu/` or similar repositories to `http://old-releases.ubuntu.com/ubuntu/`
    
3. Save and `apt update`
    

## Sources

I learned this from https://askubuntu.com/a/1131285
