As usual, we would like to recommend unplugging the negative battery cable for safety.
Unplug the brake fluid level sensor electrical connector shown in image.
Next, disconnect the brake lines from the master cylinder, don't forget to use a backup wrench to hold the brake line adapter to keep it from turning while loosening the brake line.
To avoid loosing brake fluid and to keep air from entering the brake line use a small piece of rubber hose with a tight screw at the end to plug each brake line as shown in the image.
Next, remove the brake line adapter from the master cylinder.
Using a deep socket, an extension and a ratchet, remove the nuts that fasten the brake master cylinder to the brake booster and remove it from the truck.
Place the master cylinder inside a clean pan and proceed to remove the brake fluid level sensor to be installed on the new master cylinder if it doesn't come with one.
Fasten the new master cylinder on a vise, install the new seal on the brake line adapter, apply a light coat of brake fluid and install it on the new master cylinder.
Install the plastic plugs provided with the new master cylinder.
Fill the reservoir with new brake fluid.
Install the cap on the reservoir and proceed to bleed the air from the master cylinder by compressing the piston several times using a blunt tool, the piston will get harder to push as the air is bled out.
Once you are done bleeding it, install the brake fluid level sensor on the new master cylinder and install it on the truck, install the brake lines and tighten them properly.
Once the new brake master cylinder has been installed on the truck is time to bleed the air out of the system, you need to start from the farthest wheel, it is easier to loosen the bleeder screw using a socket and a ratchet, once the bleeder screw has been loosened you can use a wrench to turn the bleeder screw.
If you have access to a vacuum pump, use it to bleed the brake system, if you don't have one have a friend pump the brake pedal 3 times and hold it down while you loosen the bleeder screw to allow brake fluid and air come out, tighten the bleeder screw before your friend lets the pedal go back up, repeat this step several times till no air bubbles come out.
Perform this procedure on each wheel, make sure that you keep an eye on the brake fluid level as you bleed the system, once all the wheels have been bled take the truck for a test drive, if you did everything correctly the brakes should work properly and there shouldn't be any brake fluid leaks.