I don't know about how we would show a dialog "do you want to remove user data too?" on linux like uninstallers do on windows - AFAIK that's not common on linux. on linux there are package managers, on windows each program ships their own uninstall.exe program
If you want easy way to remove apps including user data on linux, then use flatpak:
flatpak uninstall --delete-data <app-name>