I think Oprah's experience with Optifast was pretty famous.
I did something similar in college, I lost a bunch of weight very quickly (along with handfuls of hair in the shower). Gained every bit of it back and more when I started eating again. Gained it back so quickly I got 3 permanent stretch marks on my belly to remind me of why a liquid diet was a bad idea for me.
I'm sure there are better ways to do it, but it didn't teach me anything I needed for long term success. To be successful, I had to learn how to eat better. I had to learn how to make healthy choices, find healthy recipes, cook healthy foods, shop for healthy foods and how to handle social situations where I was surrounded by food. I could only learn those lessons by actually doing those things.
Your experience might be different.
SIX YEARS at maintenance weight!
My very long weight loss story
"I saw an angel in the marble and I chiseled until I set it free."