During installation, when a file is modified, a backup of that file is stored in the SERVER_INSTALL\Apps\APP_NAME\VERSION\UI\Backup\ directory. During uninstall, all of the backed-up directory is copied to web root. This makes web root look the same as it was before the application was installed.