Can you not unlink() and then null out `$file`?

```php
unlink($file->getRealPath());
$file = null;
```