bootstrap: apt packages fail on a freshly installed machine because apt-get update never runs
I was setting up a new machine with mise bootstrap and it died at the packages step:
mise bootstrap: system packages
mise apt: 3 package(s) already installed
mise $ sudo env DEBIAN_FRONTEND=noninteractive apt-get install -y -- zsh build-essential pkg-config unzip python3-venv nala pandoc ffmpeg imagemagick
...
E: Package 'python3-venv' has no installation candidate
E: Unable to locate package nala
E: Unable to locate package pandoc
E: Unable to locate package ffmpeg
E: Package 'imagemagick' has no installation candidate
mise ERROR sudo exited with non-zero status: exit code 100
mise ERROR Version: 2026.9.14 linux-x64 (2026-09-25)A manual sudo apt-get update and re-running bootstrap fixed it, so it's just stale package lists.
From what I can tell in apt.rs, mise only runs apt-get update when there are no *_Packages files in /var/lib/apt/lists at all. That covers a fresh container, but a machine you just installed from an ISO already has lists, they're just not complete or up to date. So the refresh is skipped, and since everything goes into one apt-get install, a single package it can't find fails the whole bootstrap before repos/dotfiles/tools run.
I know mise bootstrap --update exists, but it also updates the configured repos, which I don't want to happen on a first install. mise bootstrap packages apply --update works too, you just have to know to run it before the first bootstrap, and on a new machine you usually find out after it fails.
Would it make sense to refresh when a requested package has no install candidate? The apt manager already calls apt-cache policy in policy_installable(), so install could check the missing packages first and run apt-get update once if any of them come back without a candidate. Checking how old the lists are would also work, but the candidate check seems more precise.
For now I worked around it in my install script by running apt-get update whenever mise bootstrap packages status --json reports anything not installed.
mise 2026.9.14, Ubuntu 24.04.4
Source: jdx/mise