If you want to delete any object that you have deployed, you must first undeploy the object. You cannot delete any object that is in the deployed state. You can also remove the object from the run time and place it in the design time by undeploying the object.
When a primary object is undeployed, its supporting objects are also undeployed if they are not referred in any other deployed primary object. You can undeploy objects either in bulk or individually.