Replace UIDs in db prior to adding of packages.