Some different ways.I found this works well and is messy to boot.
Open the reservoir.Get a bottle of fluid to keep it topped off.
Remove the caliper from the rotor and remove the pads.(single piston type)
Leave the caliper hang in a bucket and start pumping the brake.It will push the piston out.
If it's dual piston,hold a large screwdriver blade across the pistons.This will stop them just short of coming out till the second one can catch up.
Another method is less messy but also works...
refit the bleeder screw with a grease zerk and pump grease into the caliper.
I avoid using compressed air.It can send a piston into a breakable object....Please don't ask me how I know.
My wife also likes to read these posts.