You can delete any directory from the given path programmatically Using Magento 2 without manual delete.
For example, You have created a directory in var folder at a time of developing functionality and in the future, want to delete the directory from the var folder, You can do it using delete() method of WriteInterface.
