Extracting function _delete_host_directories