As mentioned here already, the Recycle Bin is keeping deleted files.
If you want to change the pdf that is attached to the media item, you can detach it and attach a new one - this will change the pdf but the item (and the url) will stay the same.
Info about the attach/detach can be found here: https://www.techguilds.com/Blog/2018/06/managing-the-sitecore-...
This answer isn't mine but posting in case anyone may need in future.
As per @Nehemiah from Sitecore slack:
I don't think so. I believe they are part of middleware where Sitecore context won't be there.
I followed the link mentioned by @Jeroen. https://sitecore.stackexchange.com/a/26878/3632
One small adjustment I had to make was, I assigned the ...