Executing user teardown before restoring patches