The right thing to do here is to put the book or course into "Stealth Mode". That way the book or course will not show up on Leanpub any more, but you can still work on it.
Please note that if your book or course is currently published, before you can put it into Stealth Mode, first you have to unpublish the book or course.
To put a book into Stealth Mode, please go here:
...making sure to replace YOUR_BOOK with your book's unique web address.
You can also find a link to this page on your book's Overview page, under "Settings":
On that page, you will see a tick box and a button:
If you tick the box and click the button, that will "Stealth" your book. This means no information about the book will appear on the book's landing page, on your profile page, etc.