the socket normally has enough bite on the nut to remove the nut with the locking plate as one unit. If you are removing without an impact wrench, bend in the outer rim of the locking plate with a screw driver or similar
locknut with another. Remove both nuts completely from the end of the cable and put them somewhere safe as the new cable may not come with any. If the inner cable tries to move round as you remove the adjuster nut, hold the metal end of the cable with pliers until the adjuster undoes...