It is well known that source deghosting can best be applied to common-receiver gathers, whereas receiver deghosting can best be applied to common-shot records. The source-ghost wavefield observed in the common-shot domain contains the imprint of the subsurface, which complicates source deghosting in the common-shot domain, in particular when the subsurface is complex. Unfortunately, the alternative, that is, the common-receiver domain, is often coarsely sampled, which complicates source deghosting in this domain as well. To solve the latter issue, we have trained a convolutional neural network to apply source deghosting in this domain. We subsample all shot records with and without the receiver-ghost wavefield to obtain the training data. Due to reciprocity, these training data are a representative data set for source deghosting in the coarse common-receiver domain. We validate the machine-learning approach on simulated data and on field data. The machine-learning approach gives a significant uplift to the simulated data compared to conventional source deghosting. The field-data results confirm that the proposed machine-learning approach can remove the source-ghost wavefield from the coarsely sampled common-receiver gathers.