When a user installs my app I register his registration ID (android) or device token (iOS) and send push notifications that work fine. But now I want to remove the user from
AFAIK, you cannot know when your app is uninstalled.
For your android app, observe the response GCM returns when you send a notification. If it sends a NotRegistered
message, you can remove that id from your server. Read how unregistration works
For iOS : read this Question and its answer on SO