The package cache refresh fails or bootstrap stalls

The package cache refresh fails or bootstrap stops at the package step because a repository is unreachable, so disable it and rebuild.

Condition

apt-get update fails, or bootstrap stops at the package step.

Cause

A repository is unreachable, often a leftover public one.

Remedy

Disable the repository in the image, and rebuild.