I think I figured it out. Here're the steps:
- Download a Linux distro and create a live USB.
- Boot up from the live USB to the Linux distro.
- Check the size of the partition that currently has Ubuntu on it by sudo fdisk -l. Ignore home and swap partitions. Remember the size of the root partition.
- Select to install the new distro.
- When asked about "Installation Type", choose "Something else" (or "Manual installation" in some distros).
- In the partition table, find the Ubuntu root partition. Double check the size and make sure it matches with the root partition.
- Delete the partition. Now you have a free space of the same size (or more if you have had free space before the deletion).
- Create a new partition from the free space. The type of the partition should be "primary" and mount it as "/".
- Check the "Format?" box so the new partition will be wiped out. If you want to keep files, do not check the "Format?" box.
- If you want to keep an existing home partition, you need to mount it as home again.
- Proceed to create user name and password. If you want to access an existing home partition, make sure you use exactly the same user name and password. Otherwise you will have authorization issues.
That's it. You can dual boot as usual.
Update on 04/26/2025:
I tried the method above and it worked. The only unexpected thing was a warning saying something like "efi partition is missing. If you proceed you won't be able to boot blah blah." I quit the installation and made sure I booted from the UFEI flash drive (some systems show two USB devices, one with UFEI in the name and the other without; choose the one with UFEI). If you are sure you booted from the UFEI flash drive, you should be fine.
As it turned out, Calamares provides an even simpler way to replace the ubuntu (replace here means clean slate reinstallation of a new distro). It is called "Replace Partition". With this option, you don't need to worry about deleting/creating partitions, the efi warnings, or existing home/swap partitions. You simply select the partition where the root of the outgoing Ubuntu is located and proceed with installation. Calamares will take care of the rest.
The whole process is like a breeze! It is truly worry free. Note the partition you choose will be wiped clean by default. This is exactly what I want, because I suspect my old system is corrupted. After the re-installation, everything works, including some packages I couldn't install before.
Happy Ubuntu'ing!