[Feature] Add a way to selectively delete resources for games (screenshots, manuals, etc.)
Is your feature request related to a problem? Please describe.
Yes. The recent v4.0.0 update introduced a great feature where games with missing files are marked as "missing from filesystem" instead of being deleted entirely. The changelog says:
In previous versions, RomM would delete games from the database if the file(s) were missing from the filesystem. This would lead to the loss of notes, save files and manual metadata matches. Now, these games will be marked as "missing" instead of being deleted, allowing you to restore them later if the files are added back.
While this is a fantastic improvement to prevent data loss, it creates a new problem in specific scenarios. For example, I have multiple regional versions of the same game that are correctly grouped under one entry (e.g., Pokémon Emerald USA and Pokémon Emerald Spain).
If I delete the file for the "Spain" version, RomM now flags that specific file entry as "missing". However, I still have the "USA" version, so the game is not truly missing from my library. The interface now shows a "missing" game entry that I cannot get rid of, because I want to keep the data for the "USA" version.
Currently, there is no way to manually remove only the data associated with the missing file ("Pokémon Emerald Spain") while keeping the main game entry and the data for the file I still have ("Pokémon Emerald USA"). This leads to a cluttered library with "missing" entries that are not actually missing.
This also relates to a broader need for more granular data management, such as a way to delete all downloaded PDF manuals in bulk without affecting the ROMs themselves.
Describe the solution you'd like
I would like a way to selectively delete specific data associated with a game entry without deleting the entire game. This could be implemented in the UI in a few ways:
-
For Missing Files: On a game's detail page, next to each file that is marked as "missing from fs", there could be a "Delete" or "Prune" button. Clicking this would remove only the database records associated with that specific missing file (its hash, filename, path, etc.), leaving the rest of the game entry intact.
-
For Other Resources: On the game's edit page or details page, add options to delete specific associated resources, for example:
- A button to "Delete downloaded PDF manual".
- A button to "Delete all downloaded screenshots".
This would give users fine-grained control to clean up their library and remove orphaned or unwanted data without losing the entire game entry or manually matched metadata.
Describe alternatives you've considered
- A new scan type: An alternative could be a "Cleanup Scan" that looks for these orphaned "missing" entries and prompts the user to remove them if other valid files for the same game still exist. However, a manual approach directly in the UI would be more direct and give the user more immediate control.
- A global setting: A setting like "Automatically prune data for missing files" could work, but it's less flexible than allowing the user to make the decision on a case-by-case basis.
Additional context
This feature would significantly improve library management by allowing users to keep their database clean and accurate, especially for those of us who curate multiple versions of games. It extends the philosophy of giving users more control over their data, which was started with the "missing from fs" feature.
Thank you for considering this feature
+1 for having an option to clean missing data. I recently removed all games for a specific platform but theres no way to get rid of it in the interface.
This also relates to a broader need for more granular data management, such as a way to delete all downloaded PDF manuals in bulk without affecting the ROMs themselves.
You can do this today by deleting all the PDFs in the filesystem:
docker exec -it romm sh
cd resources
find . -name '*.pdf' -type f -delete
and clearing the entries from the database from a SQL shell:
UPDATE roms SET url_manual = null, path_manual = null
Thanks, I'll give that a try. Still hope this can be integrated as a task that can be run from the web UI eventually.
I am also running into this need as well.
I think we at least need a button or something to revert to the old system because waiting for this feature to get fleshed out is less than ideal.
I just compressed my ROMs (so file names changed) and deleted a bunch I don't want now I am basically stuck until either this feature gets integrated or I need to go through the painful process of simply deleting everything and re-download all the metadata again. Which isn't nice to those hosting providers.
am basically stuck until either this feature gets integrated or I need to go through the painful process of simply deleting everything and re-download all the metadata again
@ChaosBlades can you elaborate about which data/files you'd like to delete?
@gantoine everything that Romm reports as missing.
like game files? you can do that from the "Missing games" page under /library-management. unless you're thinking about some other data, in which case let me know exactly what you're trying to delete.