GNOME is still showing the icon because a per-user MIME cache and file-type association are left behind in your home directory; the system-wide files you removed don’t touch those.
$HOME/.local/share/applications/mimeapps.list (line that saystext/dssfilelist=DeepSkyStacker.desktop;)
The user-level MIME cache in $HOME/.local/share/mime/mime.cache
Quick clean-up
#Remove the user copy of the MIME definition (if it exists)
rm -f ~/.local/share/mime/packages/com.github.deepskystacker-x-text-dssfilelist.xml
#Remove the association from your personal mimeapps list
sed -i '/text\/dssfilelist/d' ~/.local/share/applications/mimeapps.list
#Rebuild the user MIME cache
update-mime-database ~/.local/share/mime
Then log out and back in (or restart your file manager).
The .dssfilelist files will fall back to the generic text icon.
(If you want to automate it, run the same three steps in your uninstall script no sudo needed, because they touch only the current user’s home directory.)
xdg-mime install (when run with sudo) copies your XML into /usr/local/share/mime/packages/.
Likewise, desktop-file-install drops a copy of the desktop file in /usr/local/share/applications/.
So even after you delete the originals in /opt, the copies in /usr/local
are still there, update-mime-database keeps finding them, and Nautilus keeps
using your icon.
Clean-up steps
#Remove the mime-type definition that was copied to /usr/local
sudo rm -f /usr/local/share/mime/packages/com.github.deepskystacker-x-text-dssfilelist.xml
#Rebuild the MIME database
sudo update-mime-database /usr/local/share/mime
sudo update-mime-database /usr/share/mime # safe to run too
#Delete the desktop file copy
sudo rm -f /usr/local/share/applications/DeepSkyStacker.desktop
#Rebuild the desktop cache
sudo update-desktop-database
Log out/in (or killall nautilus) and the .dssfilelist files should go
back to the generic icon.
Tip for next time
Use the explicit mode option so xdg-mime touches the location you expect:
#install system-wide
sudo xdg-mime install --mode system com.github.deepskystacker-x-text-dssfilelist.xml
#uninstall system-wide
sudo xdg-mime uninstall --mode system com.github.deepskystacker-x-text-dssfilelist.xml
That way no hidden copy ends up in /usr/local/share and uninstalling is a
one-liner.