im trying to completely delete pdf files from Drupal 9. Basically i need to keep the same url(external url, images are save on S3) path for the documents but we have version changes almost every month. Once i try to remove the file ( even if it says that is not used anywhere) it keeps a record on the files library and is adding _0 _1 when i try to upload with same name.
I have tried https://www.drupal.org/project/file_delete but no luck as it does not delete the file immediately.
Use can use Fancy File Delete module https://www.drupal.org/project/fancy_file_delete
What this module can do: