diff --git a/.svgo.yml b/.svgo.yml
index 313bf7c68..b9cb71454 100644
--- a/.svgo.yml
+++ b/.svgo.yml
@@ -49,7 +49,7 @@ plugins:
- removeEmptyAttrs
- removeEmptyContainers
- mergePaths
- - removeUnusedNS
+ - cleanupNS
- sortAttrs
- removeTitle
- removeDesc
diff --git a/plugins/cleanupIDs.js b/plugins/cleanupIDs.js
index 2b61b93f7..070901ddb 100644
--- a/plugins/cleanupIDs.js
+++ b/plugins/cleanupIDs.js
@@ -29,14 +29,16 @@ var referencesProps = new Set(require('./_collections').referencesProps),
* Remove unused and minify used IDs
* (only if there are no any
+
+ test
+
+
+
+@@@
+
+
diff --git a/test/plugins/cleanupNS.12.svg b/test/plugins/cleanupNS.12.svg
new file mode 100644
index 000000000..8faa9e62c
--- /dev/null
+++ b/test/plugins/cleanupNS.12.svg
@@ -0,0 +1,23 @@
+
+
+@@@
+
+
+
+@@@
+
+{"force": false}
diff --git a/test/plugins/cleanupNS.13.svg b/test/plugins/cleanupNS.13.svg
new file mode 100644
index 000000000..4abfd94d0
--- /dev/null
+++ b/test/plugins/cleanupNS.13.svg
@@ -0,0 +1,19 @@
+
+
+@@@
+
+
diff --git a/test/plugins/cleanupNS.14.svg b/test/plugins/cleanupNS.14.svg
new file mode 100644
index 000000000..2e4ed7d89
--- /dev/null
+++ b/test/plugins/cleanupNS.14.svg
@@ -0,0 +1,23 @@
+
+
+@@@
+
+
+
+@@@
+
+{"force": false}
diff --git a/test/plugins/cleanupNS.15.svg b/test/plugins/cleanupNS.15.svg
new file mode 100644
index 000000000..1f467a94d
--- /dev/null
+++ b/test/plugins/cleanupNS.15.svg
@@ -0,0 +1,17 @@
+
+
+@@@
+
+
+
+@@@
+
+{"remove": false}
diff --git a/test/plugins/cleanupNS.16.svg b/test/plugins/cleanupNS.16.svg
new file mode 100644
index 000000000..8ff776e15
--- /dev/null
+++ b/test/plugins/cleanupNS.16.svg
@@ -0,0 +1,21 @@
+
+
+@@@
+
+
+
+@@@
+
+{"preserve": "test2"}
diff --git a/test/plugins/cleanupNS.17.svg b/test/plugins/cleanupNS.17.svg
new file mode 100644
index 000000000..6aaab924f
--- /dev/null
+++ b/test/plugins/cleanupNS.17.svg
@@ -0,0 +1,17 @@
+
+
+@@@
+
+
+
+@@@
+
+{"preserve": "test2"}
diff --git a/test/plugins/cleanupNS.18.svg b/test/plugins/cleanupNS.18.svg
new file mode 100644
index 000000000..a1b7af27f
--- /dev/null
+++ b/test/plugins/cleanupNS.18.svg
@@ -0,0 +1,17 @@
+
+
+@@@
+
+
+
+@@@
+
+{"preserve": "xmlns"}
diff --git a/test/plugins/cleanupNS.19.svg b/test/plugins/cleanupNS.19.svg
new file mode 100644
index 000000000..b2c81e70d
--- /dev/null
+++ b/test/plugins/cleanupNS.19.svg
@@ -0,0 +1,13 @@
+
+
+@@@
+
+
diff --git a/test/plugins/cleanupNS.20.svg b/test/plugins/cleanupNS.20.svg
new file mode 100644
index 000000000..8658c666b
--- /dev/null
+++ b/test/plugins/cleanupNS.20.svg
@@ -0,0 +1,17 @@
+
+
+@@@
+
+
+
+@@@
+
+{"preserve": "xml"}
diff --git a/test/plugins/cleanupNS.21.svg b/test/plugins/cleanupNS.21.svg
new file mode 100644
index 000000000..d7ed24762
--- /dev/null
+++ b/test/plugins/cleanupNS.21.svg
@@ -0,0 +1,17 @@
+
+
+@@@
+
+
+
+@@@
+
+{"preserve": "a"}
diff --git a/test/plugins/cleanupNS.22.svg b/test/plugins/cleanupNS.22.svg
new file mode 100644
index 000000000..97c478385
--- /dev/null
+++ b/test/plugins/cleanupNS.22.svg
@@ -0,0 +1,23 @@
+
+
+@@@
+
+