At the moment we write the list of deployed files to the host when running devtool deploy-target, and this list is used by devtool undeploy-target (which is automatically run the next time we run deploy-target if the list is present, in case any files have been renamed or deleted since the first time), However, it would probably make more sense to write the list to the target, so that if we for example swapped in a different board it wouldn't just assume that it still needed to undeploy previously deployed files.
Now implemented in master: http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=b95c72c4dcac97b00ad46cd6b0ff0a854a0e867f