Check out example codes for "how to delete virtual hard disk virtualbox". It will help you in understanding the concepts better.

Code Example 1

vboxmanage list hdds

Code Example 2

vboxmanage closemedium disk <uuid> --delete

Learn ReactJs, React Native from akashmittal.com