# Remove snap packages (saves 100s of MB) sudo snap remove --purge firefox gnome-3-38-2004 core20 sudo apt autoremove --purge linux-image-5.*-generic Clean journal logs (compresses to near nothing) sudo journalctl --vacuum-size=10M Use deborphan to delete orphaned libraries sudo apt install deborphan sudo apt purge $(deborphan)
mksquashfs root-folder/ custom-ubuntu.squashfs -comp xz -b 1M -Xbcj x86 -Xdict-size 1M This can shave another 10-20% off. A 15MB image becomes 12-13MB. To truly get 10MB, you must abandon general-purpose computing. Build a single, static binary (like a minimal Go or Rust program) that runs as PID 1. Embed a tiny shell. Compress the kernel and initramfs together.
In the vast ecosystem of Linux distributions, Ubuntu stands as a giant—renowned for its user-friendliness, extensive software repositories, and robust community support. However, the standard Ubuntu ISO has grown significantly over the years. A typical installation of Ubuntu Desktop now hovers around 4.5 GB . So, when users begin searching for an "Ubuntu highly compressed 10MB" version, eyebrows raise. Is this a magical, undetectable distro? A compression miracle? Or a fundamental misunderstanding of what an operating system requires?