It seems to me that some files I write to global directories such as /usr are not persistent. Concretely I experience that the installation of some self-compiled software (webkit-qt) to global directories is broken after some time until I reinstall it. The relevant webkit installation is installed by the package management at the same time to fullfill dependencies. So each time I install I certainly overwrite some of these files. Please don't tell me that this is not nice to do. I am aware of it. I am just wondering if there is some mechanism in ubuntu which restores the old version of the files (other than the package management if I reinstall some package of course)!
If you want to divert files associated with packages that are installed (or that you intend to install), so that you can replace them with your own files but restore them later, you should use the
Since I don't have all the details of your situation, it would be hard for me to recommend specific syntax, beyond the information provided in that manual page.
Other than the package manager and the tools that are part of it (including
The other exception is parts of