Yes, you can do this. You can choose to move each subcategory from its edit page before deleting the main category or you can move all subcategories at once when you delete the category. In order to go to the edit page of a subcategory, click on the edit icon located near it.
If you choose to delete a category, you will be asked if you want to delete all its categories or if you want to move them under another main category.
Attention: If there is no other main category, you have to create it on the Categories management page before the deletion process.
Listed in: Categories settings