As with the nothing package, this function will unload everything except the base R packages from the search path prior to re-building.
rebuild(packages)
list of locked_packages.