How do I clean up remembered files in builtin files app?
Delete cache of the file manager and photos app.

Go to the app info section in your settings, enable &quot;show system apps&quot; on the hamburger menu, locate media storage, delete it's cache. Reboot, wait for a few minutes for the media databases to build up again and your problem most likely would be solved.

This may not always solve the problem as explained very well in this answer by Irfan Latif and you may have to resort using apps such as AZ media rescan