Skip to content

Instantly share code, notes, and snippets.

@yorickdowne
Last active April 29, 2026 10:34
Show Gist options
  • Select an option

  • Save yorickdowne/a3c963cd8938a20c59c5c157367f1089 to your computer and use it in GitHub Desktop.

Select an option

Save yorickdowne/a3c963cd8938a20c59c5c157367f1089 to your computer and use it in GitHub Desktop.
Upgrade to Ubuntu Resolute Raccoon

This is a placeholder gist for the Ubuntu 26.04.1 release, expected on August 9th 2026. do-release-upgrade will only update from 24.04 LTS once 26.04.1 LTS has been released.

Ubuntu 26.04 "Resolute Raccoon"

To start, read the official release notes.

If your install fits into "vanilla Ubuntu plus maybe a handful of 3rd-party repos", then this guide for a simple upgrade to Ubuntu 26.04 "Resolute Raccoon" from Ubuntu 24.04 "Noble Numbat" can be helpful. 3rd-party repos are handled manually.

Note upgrade is only supported from Ubuntu 24.04 or later to Ubuntu 26.04. If you are on Ubuntu 22.04, upgrade to Ubuntu 24.04 first. Then once on Ubuntu 24.04, you can upgrade to Ubuntu 26.04.

  • Check free disk space
    df -h

5 GiB free is a conservative amount. sudo apt clean and sudo apt autoremove can be used to free some disk space.

  • Identify any 3rd-party repos that may need to be updated. They'll be changed manually, if the upgrade process cannot migrate them automatically.
    ls /etc/apt/sources.list.d

  • Update current distribution
    sudo apt-get update && sudo apt-get dist-upgrade --autoremove -y

If this brought in a new kernel, sudo reboot - otherwise continue

  • Update Ubuntu

For the following, keep existing config files when prompted.
sudo do-release-upgrade --allow-third-party

Reboot at the end. If you told the upgrade script not to reboot, reboot manually with sudo reboot

  • Change all 3rd-party repos

This is after the reboot so do-release-upgrade handles ubuntu.sources and any .sources and .list files it can.

Some repos may have been disabled: They'll have a <repo>.list.disabled file, but no <repo>.list file. Check any <repo>.sources files, they may have been upgraded already, including switching from noble to resolute.

For repos that have been disabled, they'll have a note at the top of the file: This file could not be automatically migrated to a .sources file during the upgrade

To resolve this, you'll want to add the repository again, in deb822 .sources format. How to do this depends on the exact repository you are using, refer to their documentation. For example for Docker CE and Python backports. Avoid .list as much as you can. It is still supported, but support may be removed by 2029.

Run an sudo apt-get update and if it fails on some repos because they haven't been updated to resolute, revert those to noble. Keep monitoring them and bring them to resolute when they are ready.

Bring in the updated 3rd party repos
sudo apt-get dist-upgrade --autoremove

  • Enable chrony

Ubuntu 26.04 defaults to using chrony for NTP time sync. If you previously used the default systemd-timesyncd, migrate:

sudo apt-mark auto systemd-timesyncd && sudo apt-get install -y chrony

Automated by Ansible

Note this playbook doesn't handle .list or .sources 3rd-party repos that cannot be updated automatically by Ubuntu. Handle those yourself, add whatever installation logic you need for them to your playbook.

Likewise, migration to chrony is not in this playbook.

Config ansible.cfg:

[defaults]
interpreter_python = /usr/bin/python3

Playbook resolute.yml:

---
- name: Upgrade to Ubuntu Resolute Raccoon
  hosts: all
  serial: 1
  gather_facts: false
  roles:
    - base/upgrade_resolute

Role base/upgrade_resolute/tasks/main.yml:

---
- name: Get distribution version
  setup:
    filter: ansible_distribution*
- name: Skip if not Ubuntu 24.04
  meta: end_host
  when: ansible_distribution != 'Ubuntu' or ansible_distribution_version != '24.04'
- name: apt clean
  apt:
    clean: yes
  become: yes
- name: Get filesystem facts
  setup:
    filter: ansible_mounts
- name: Fail if free space on / is below 5 GiB
  ansible.builtin.assert:
    that:
      - item.size_available > (5 * 1024 * 1024 * 1024)
    fail_msg: "Free disk space on {{ item.mount }} is below 5 GiB"
  loop: "{{ ansible_mounts }}"
  when: item.mount == "/"
- name: All apt packages up to date
  apt:
    upgrade: dist
    update_cache: yes
  become: yes
- name: apt autoremove
  apt:
    autoremove: yes
  become: yes
- name: apt clean
  apt:
    clean: yes
  become: yes
- name: Check if reboot required
  ansible.builtin.stat:
    path: /run/reboot-required
  register: reboot_required_file
- name: Reboot if required
  ansible.builtin.reboot:
    msg: "Reboot initiated by Ansible"
    connect_timeout: 5
    reboot_timeout: 600
    pre_reboot_delay: 0
    post_reboot_delay: 60
    test_command: whoami
  when: reboot_required_file.stat.exists
  become: true
- name: Use do-release-upgrade to move to resolute
  ansible.builtin.shell:
    cmd: do-release-upgrade -f DistUpgradeViewNonInteractive --allow-third-party
  become: yes
- name: Get distribution version
  setup:
    filter: ansible_distribution*
- name: Fail if not Ubuntu resolute
  assert:
    that:
      - ansible_distribution_version == '26.04'
    fail_msg: "Upgrade to Ubuntu Resolute Raccoon failed"
- name: Reboot on resolute
  ansible.builtin.reboot:
    msg: "Reboot initiated by Ansible"
    connect_timeout: 5
    reboot_timeout: 600
    pre_reboot_delay: 0
    post_reboot_delay: 60
    test_command: whoami
  become: yes
- name: Pause for 5 minutes for staggered upgrades
  pause:
    minutes: 5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment