You could iterate model.named_modules() and check the returned module to be an nn.Linear instance:
for name, module in model.named_modules():
    if isinstance(module, nn.Linear):
        print(name, module.weight.grad)