package names
Returns a list of the names of all packages in the interpreter for which a version has been provided (via package provide) or for which a package ifneeded script is available. The order of elements in the list is arbitrary.
See also:
Tcl syntax help - Category Command - Category Introspection