This would do it (please only try if you actually want to update all your environments to the latest versions of all packages):
using Pkg, TOML
for manifest in keys(TOML.parsefile(joinpath(DEPOT_PATH[1], "logs", "manifest_usage.toml")))
Pkg.activate(dirname(manifest))
Pkg.update()
end