Short answer
Generally, apps are cleanly uninstalled, and most if not all of their data will be removed along. Some exceptions may however apply to their data stored on sdcard, if any.
Detailed answer
Android uses a data structure which is defined by the developers API, and developers should stick to it. There are also not too many ways they could deviate, as e.g. file system permissions prevent this.
Aside from the .apk
(the app itself) installed at a defined place, there are also defined places for the apps data: All these can only go below /data/data/<package_name>
on internal storage (rare chances an app can access other places in internal storage to place its data, except from some "temporary" or cache locations. As for the sdcard, the API strongly recommends to use Android/data/<package_name>
as corresponding place (see API documentation).
As long as developers stick to these rules, uninstalling the app will also remove all its data (as the system takes care for all those locations defined by the developer documentation, since these are easily identified via the package name). However, on the sdcard there are almost no restrictions which places an app can access (which is due to the FAT file system used for these cards), and some apps go wild here.