Remove macOS from a APFS container?

This answer is a continuation of my answer to the question: APFS - Is it possible to install 2 macOS versions inside one APFS container?

You can use Disk Utility under High Sierra to remove the APFS volume containing Mojava. However, removing Mojave also requires steps where commands are issued in a Terminal application window. Below are the steps I used to remove the Mojava.

  1. Open the Disk Utility application.
  2. Get the file system UUID of the Mojave 1 volume . Right click the icon labeled Mojava 1 in the Disk Utility application and select Get Info. In my case, the file system UUID is 0FF6C520-6C07-40ED-9AED-FD6E28A6E406.
  3. Use Disk Utility to remove the APFS volume containing Mojava. Right click on the icon labeled Mojava 1 in the Disk Utility application and select Delete APFS Volume....
  4. Boot to macOS Recovery.
  5. Open a Terminal application window.
  6. Enter the command below to disable System Integrity Protect (SIP) on next restart.

    sudo  csrutil  disable
    
  7. Boot back to High Sierra.

  8. Open a Terminal application Window.

  9. Enter the commands below to remove Mojava from APFS Volume Preboot.

    diskutil  mount  disk2s2
    cd /Volumes/Preboot
    rm  -Rf  0FF6C520-6C07-40ED-9AED-FD6E28A6E406
    cd  ~
    diskutil  unmount  disk2s2
    
  10. Enter the commands below to remove Mojava from APFS Volume My Recovery.

    diskutil  mount  disk2s3
    cd  "/Volumes/My Recovery"
    rm  -Rf  0FF6C520-6C07-40ED-9AED-FD6E28A6E406
    cd  ~
    diskutil  unmount  disk2s3
    
  11. Reset the SIP settings, by entering the command given below.

    sudo  csrutil  clear
    
  12. Restart the Mac