It isn't supposed to, of course. But there should be a standard facility offered by the OS that well-behaved apps can use to install components, through which the OS WILL log each of them and be able to remove them later.
The main challenge is shared libraries; these are hard to delete reliably, even if the installer keeps a "use count" that it can increment and decrement. Just one non-compliant dependency will be broken if you remove all the compliant ones and a lib it needs gets blown away.
The main challenge is shared libraries; these are hard to delete reliably, even if the installer keeps a "use count" that it can increment and decrement. Just one non-compliant dependency will be broken if you remove all the compliant ones and a lib it needs gets blown away.