Apply an herbicide. Herbicides come in two major forms: selective and non-selective. Selective herbicides are designed to kill certain types of plants without killing others. It may be possible to find a selective herbicide mix that kill nut grass and coffee weeds and nothing else, but it is extremely rare. The more realistic option is to use a non-selective herbicide, which kills everything it touches.
Till the land. A natural way to kill nut grass and coffee weeds is to till the area. Rototillers can be hand-held (best for small areas) or motor-powered (best for large areas). A rototiller works by turning over the soil, thus destroying the roots of nut grass and coffee weeds. Note that, as with herbicides, tilling the land kills any desirable plants and grasses as well.
Pull the nut grass and coffee weeds by hand. This is only a realistic option if you are dealing with a small area.
Plant ground cover plants such as clover. Ground cover plants steal nutrients and sunlight from weeds and coffee grass, thus slowly killing them.
Install landscape edging fabric. Available at most home and garden stores, landscape edging fabric, which is somewhat like a miniature fence, does not kill nut grass and coffee weeds, but it does prevent them from spreading into other areas.