update versions of folders not removed up to the user root when deleting a document