Remove common prefix from package names in the graph