lgsm/mods/modname-files.txt. This list allows the mod to be removed if required. LinuxGSM developers have whitelisted important customisable files such as mod config files that will not be removed. If there are any important files that have been missed please raise an issue.
lgsm/mods/installed-mods.txtis used to identify which mods are installed. If a non-referenced mod is found, the updater will stop with an error.
mods_core.shin order to remove lines from mod's file list so that they do not get wrongly removed with the mods-remove command. For further assistance on developing this contact UltimateByte who developed those functions and dgibbs that reworked it should be able to help.