If there are any pages built with the theme, to uninstall the theme you have to remove the pages where it has been used. In the case of an existing child theme, you would have to delete the child theme in the design manager, then proceed to uninstall the theme.