Note: This was only necessary for packages there were registered in both the old METADATA system and the new registry system. It has not been necessary for years and the functionality described has been deleted. If you need a UUID for a new package, you can use the UUIDs.uuid4() function to generate a random UUID or use a package templater Pkg.generate() or PkgTemplates which will generate a random UUID for you.
If you’re planning on registering the package any time soon, you need to use this utility function to generate a METADATA-compatible UUID:
julia> import Pkg
julia> Pkg.METADATA_compatible_uuid("MyPkg")
UUID("793ebe2b-975c-555a-bd0c-65619c3a03ab")
If you’re not planning on registering it (in the near future) then you can generate a random UUID using one of the UUID-generating functions. I recommend uuid4 to generate a random UUID:
julia> uuid4()
UUID("d123c894-4263-439f-b244-578b071eadd5")
The uuid1 function is time-based, which seems less safe than a fully random UUID.