LightGraph tutorial

This is unlikely to be the proper way to do it but it should give you the corresponding list of packages:

using Pkg.TOML: parsefile
registry = parsefile(joinpath(first(DEPOT_PATH), "registries", "General", "Registry.toml"))
pkgs = [package["name"] for package in values(registry["packages"])]

As already mentioned this is only the first step and there are more things that have changed with the package manager. However, all necessary information to build the package DAG is available in the same directory and can be obtained using parsefile on the appropriate TOML files in there. An earlier discussion may also be helpful to get further: Replacement for Pkg.dependents() in 1.0?