Steps to reproduce
Import a world or pack on iPhone using the workaround described in MCPE-47250.
Delete the world or pack from the world list or Settings>Storage inside Minecraft.
Navigate to the device settings for Minecraft, e.g. Settings (app)>General>iPhone Storage>Minecraft
Expected result
You do not find a copy of the world or pack there.
Observed result
The world or pack is shown in the list of internal storage along with various settings and cache files. It remains there after several restarts of the game. See demonstration here:
https://youtube.com/shorts/ALqzkY7RU1w?feature=share
Note: I was not able to reproduce this using the steps above on Windows, but I have previously found old copies of mcworld files in C:\Users\owner\AppData\Local\Packages\Microsoft.MinecraftUWP_8wekyb3d8bbwe\LocalCache\minecraftpe as described here.
Related issues
is duplicated by
Comments


I can't reproduce it on 1.21.2 Android. Is it still an issue in the latest stable release or preview?

Yes, still occurs on iOS. This is an iOS-specific issue since it only occurs when using the workaround for importing worlds and packs on iOS.
In the Windows UWP file storage structure for the package, the folder LocalCache\minecraftpe is used as temporary storage for .mcworld files being uploaded to or downloaded from Realms Plus. In experimenting with this mechanism, I learned that whenever any error occurs during upload (including an error that occurs in the subsequent automatic backup), the .mcworld file handle is not closed and the file is not deleted. The file can be deleted manually, but only after exiting Minecraft (which force-closes the file handle).
This is a common problem when recovering from unexpected errors. It's very possible that the error recovery used in this situation is the same, or nearly so, across platforms, so this bug may not be limited to a single platform.
As an additional note, errors uploading to/downloading from Realms Plus are not as uncommon as they ought to be. One of the worlds I uploaded was about 380 MB (compressed size). After uploading, the dialog halted with the progress meter showing more data uploaded than the total size to upload, and it then appeared to hang for about a minute. I believe that if I had attempted to cancel at that point it would have left the file handle open and never deleted the file. In fact, what was happening during this time was that Realms Plus was making a backup, possibly because of how much time the world had been "in use" during the upload. Ultimately I waited it out, but instead of completing correctly, I got a simple "An error occurred" message and the .mcworld file was not closed and deleted. Nevertheless, the backup appeared in the Realms Plus backup list and I was able to play the world on Realms.