Note: When working with brake fluid, take precautions - it is poisonous!
1. Pump out the brake fluid reservoir and remove the hose from the nipple.

2. Disconnect the master cylinder rod from the clutch pedal.

3. Remove the pin from the master cylinder and disconnect the clutch hydraulic line.
4. Turn the master cylinder clockwise at an angle of 45 degrees and remove it.
5. Installation is carried out in the reverse order. After installation, adjust the position of the clutch pedal (see section Checking the brake system and clutch).
The article was copied from here NissanBook