In very rare instances you may want to dismiss your own bankruptcy case.
However, to do so, you must obtain permission from the court. Whether permission will be granted depends on the type of bankruptcy you have filed and why you are requesting the voluntary dismissal.
Typically most courts will not allow you to voluntarily dismiss a Chapter 7 bankruptcy case especially if you are doing so to prevent having to give up non-exempt property.
A request to dismiss a Chapter 13 bankruptcy, on the other hand, will usually be granted. Although if you are doing so to avoid surrendering an asset or turning over funds to the court, a bar may be imposed along with the dismissal preventing you from filing bankruptcy again for a specified period of time.
Finally, unlike a bankruptcy discharge which is considered a public record and will remain on your credit report from seven to ten years, a dismissed bankruptcy may not appear on your credit report at all if no discharge was entered.