TIL: Unminimizing Ubuntu Docker images | Heitor's log
TIL: Unminimizing Ubuntu Docker images
Aug 10, 2026
:: tags:<br>#Docker<br>#OCI<br>#TIL<br>#Ubuntu
Reading time: 1 minutes
I often spin up a temporary Ubuntu environment to run one-shot commands, or<br>quickly and interactively run parts of a Dockerfile, or even check some<br>Ubuntu-specific man pages. And I often get the message This system has been minimized by removing packages.
For example, if you try to check a man page in a base ubuntu:26.04 image, you<br>get this message instead:
# man man<br>This system has been minimized by removing packages and content that are<br>not required on a system that users do not log into.
To restore this content, including manpages, you can run the 'unminimize'<br>command. You will still need to ensure the 'man-db' package is installed.<br>To unminimize the container:
# apt-get update<br># apt-get install -y unminimize<br># unminimize<br>This system has been minimized by removing packages and content that are<br>not required on a system that users do not log into.
This script restores content and packages that are found on a default<br>Ubuntu server system in order to make this system more suitable for<br>interactive use.
Reinstallation of packages may fail due to changes to the system<br>configuration, the presence of third-party packages, or for other<br>reasons.
This operation may take some time.
Would you like to continue? [y/N] y<br>It then installs a list of packages and their dependencies, which takes around<br>3 minutes with my internet connection.
This doubles the virtual image size:
$ docker ps --size --format "table {{.Image}}\t{{.Names}}\t{{.Size}}"<br>IMAGE NAMES SIZE<br>docker.io/library/ubuntu:26.04 unminimized 137MB (virtual 248MB)<br>docker.io/library/ubuntu:26.04 base 11.4kB (virtual 112MB)<br>And when I need man pages, I also have to install man-db, which adds around<br>20 MB.
Here’s a one-liner for all of this:<br>apt-get update && apt-get install -y unminimize man-db && yes | unminimize
Thanks for reading! Read more?
Benchmarking OpenZFS vs EXT4 for my NAS