// Module included in the following assemblies:
//
// * microshift_troubleshooting/microshift-cleanup-data.adoc

:_mod-docs-content-type: PROCEDURE
[id="microshift-data-cleaning-full-cleanup_{context}"]
= Cleaning all data and configuration

[role="_abstract"]
You can clean up all the {microshift-short} data and configuration by running the `microshift-cleanup-data` script.

When you run the script with the `--all` argument, you perform the following clean up actions:

* Stop and disable all {microshift-short} services
* Delete all {microshift-short} pods
* Delete all container image storage
* Reset network configuration
* Delete the `/var/lib/microshift` data directory
* Delete OVN-K networking configuration

.Prerequisites
* You are logged into {microshift-short}.
* You have filed a support case.

.Procedure

. Clean up all the {microshift-short} data and configuration by running the `microshift-cleanup-data` script with the `--all` argument, by entering the following command:
+
[WARNING]
====
This option deletes all {microshift-short} data and user workloads. Use with caution.
====
+
[source,terminal]
----
$ sudo microshift-cleanup-data --all
----
+
[TIP]
====
The script prompts you to confirm the operation. Enter `1` or `Yes` to continue. Any other entry cancels the cleanup.
====
+
.Example output when you continue the cleanup
[source,terminal]
----
DATA LOSS WARNING: Do you wish to stop and clean ALL MicroShift data AND cri-o container workloads?
1) Yes
2) No
#? 1
Stopping MicroShift services
Disabling MicroShift services
Removing MicroShift pods
Removing crio image storage
Deleting the br-int interface
Killing conmon, pause and OVN processes
Removing MicroShift configuration
Removing OVN configuration
MicroShift service was stopped
MicroShift service was disabled
Cleanup succeeded
----
+
.Example output when you cancel the cleanup
[source,terminal]
----
DATA LOSS WARNING: Do you wish to stop and clean ALL MicroShift data AND cri-o container workloads?
1) Yes
2) No
#? no
Aborting cleanup
----
+
[IMPORTANT]
====
The `microshift-cleanup-data` script stops and disables the {microshift-short} service.
====
. Restart the {microshift-short} service by running the following command:
+
[source,terminal]
----
$ sudo systemctl enable --now microshift
----