diff --git a/repoman/lib/repoman/__init__.py b/repoman/lib/repoman/__init__.py
index b3690c0..97c9db8 100644
--- a/repoman/lib/repoman/__init__.py
+++ b/repoman/lib/repoman/__init__.py
@@ -1,4 +1,5 @@
 import os.path
+import shlex
 import subprocess
 import sys
 import time
@@ -6,7 +7,7 @@ import time
 try:
     import portage.const
     import portage.proxy as proxy
-    from portage import _encodings, _shell_quote, _unicode_encode, _unicode_decode
+    from portage import _encodings, _unicode_encode, _unicode_decode
     from portage.const import PORTAGE_BASE_PATH, BASH_BINARY
 except ImportError as e:
     sys.stderr.write("\n\n")
@@ -58,7 +59,7 @@ if VERSION == "HEAD":
                         + "then echo modified ; git rev-list --format=%%ct -n 1 HEAD ; fi ; "
                         + "exit 0"
                     )
-                    % _shell_quote(PORTAGE_BASE_PATH),
+                    % shlex.quote(PORTAGE_BASE_PATH),
                 ]
                 cmd = [
                     _unicode_encode(x, encoding=encoding, errors="strict") for x in cmd
diff --git a/repoman/lib/repoman/modules/vcs/bzr/status.py b/repoman/lib/repoman/modules/vcs/bzr/status.py
index 5ca18c4..88df596 100644
--- a/repoman/lib/repoman/modules/vcs/bzr/status.py
+++ b/repoman/lib/repoman/modules/vcs/bzr/status.py
@@ -2,6 +2,8 @@
 Bazaar module Status class submodule
 """
 
+import shlex
+
 from repoman._portage import portage
 from portage import os
 
@@ -31,7 +33,7 @@ class Status:
         """
         try:
             myf = repoman_popen(
-                "bzr ls -v --kind=file " + portage._shell_quote(checkdir)
+                "bzr ls -v --kind=file " + shlex.quote(checkdir)
             )
             myl = myf.readlines()
             myf.close()
diff --git a/repoman/lib/repoman/modules/vcs/cvs/changes.py b/repoman/lib/repoman/modules/vcs/cvs/changes.py
index be382f2..e36480a 100644
--- a/repoman/lib/repoman/modules/vcs/cvs/changes.py
+++ b/repoman/lib/repoman/modules/vcs/cvs/changes.py
@@ -4,6 +4,7 @@ CVS module Changes class submodule
 
 import re
 from itertools import chain
+import shlex
 
 from repoman._portage import portage
 from repoman.modules.vcs.changes import ChangesBase
@@ -96,7 +97,7 @@ class Changes(ChangesBase):
                 continue
 
             _out = repoman_getstatusoutput(
-                "egrep -q %s %s" % (headerstring, portage._shell_quote(_file))
+                "egrep -q %s %s" % (headerstring, shlex.quote(_file))
             )
             if _out[0] == 0:
                 headers.append(_file)
diff --git a/repoman/lib/repoman/modules/vcs/git/status.py b/repoman/lib/repoman/modules/vcs/git/status.py
index ec2e3a6..b2629ac 100644
--- a/repoman/lib/repoman/modules/vcs/git/status.py
+++ b/repoman/lib/repoman/modules/vcs/git/status.py
@@ -3,6 +3,7 @@ Git module Status class submodule
 """
 
 import re
+import shlex
 
 from repoman._portage import portage
 from portage import os
@@ -32,7 +33,7 @@ class Status:
         @returns: boolean
         """
         with repoman_popen(
-            "git ls-files --others %s" % (portage._shell_quote(checkdir_relative),)
+            "git ls-files --others %s" % (shlex.quote(checkdir_relative),)
         ) as myf:
             for l in myf:
                 if l[:-1][-7:] == ".ebuild":
diff --git a/repoman/lib/repoman/modules/vcs/hg/status.py b/repoman/lib/repoman/modules/vcs/hg/status.py
index 2b56f2e..d61bd7f 100644
--- a/repoman/lib/repoman/modules/vcs/hg/status.py
+++ b/repoman/lib/repoman/modules/vcs/hg/status.py
@@ -4,6 +4,7 @@ Mercurial module Status class submodule
 
 from repoman._portage import portage
 from portage import os
+import shlex
 
 # pylint: disable=ungrouped-imports
 from repoman._subprocess import repoman_popen
@@ -31,7 +32,7 @@ class Status:
         """
         myf = repoman_popen(
             "hg status --no-status --unknown %s"
-            % (portage._shell_quote(checkdir_relative),)
+            % (shlex.quote(checkdir_relative),)
         )
         for l in myf:
             if l[:-1][-7:] == ".ebuild":
diff --git a/repoman/lib/repoman/modules/vcs/svn/changes.py b/repoman/lib/repoman/modules/vcs/svn/changes.py
index e437325..15c6163 100644
--- a/repoman/lib/repoman/modules/vcs/svn/changes.py
+++ b/repoman/lib/repoman/modules/vcs/svn/changes.py
@@ -3,6 +3,7 @@ Subversion module Changes class submodule
 """
 
 from itertools import chain
+import shlex
 
 from repoman.modules.vcs.changes import ChangesBase
 from repoman._subprocess import repoman_popen
@@ -118,7 +119,7 @@ class Changes(ChangesBase):
             headerstring = r"'\$(%s).*\$'" % "|".join(enabled_keywords)
 
             _out = repoman_getstatusoutput(
-                "egrep -q %s %s" % (headerstring, portage._shell_quote(_file))
+                "egrep -q %s %s" % (headerstring, shlex.quote(_file))
             )
             if _out[0] == 0:
                 headers.append(_file)
diff --git a/repoman/lib/repoman/modules/vcs/svn/status.py b/repoman/lib/repoman/modules/vcs/svn/status.py
index 2e6ee92..4374f15 100644
--- a/repoman/lib/repoman/modules/vcs/svn/status.py
+++ b/repoman/lib/repoman/modules/vcs/svn/status.py
@@ -3,6 +3,7 @@ Subversion module Status class submodule
 """
 
 import logging
+import shlex
 import subprocess
 import sys
 
@@ -38,7 +39,7 @@ class Status:
         """
         try:
             myf = repoman_popen(
-                "svn status --depth=files --verbose " + portage._shell_quote(checkdir)
+                "svn status --depth=files --verbose " + shlex.quote(checkdir)
             )
             myl = myf.readlines()
             myf.close()
@@ -54,7 +55,7 @@ class Status:
             if l[-7:] == ".ebuild":
                 self.eadded.append(os.path.basename(l[:-7]))
         try:
-            myf = repoman_popen("svn status " + portage._shell_quote(checkdir))
+            myf = repoman_popen("svn status " + shlex.quote(checkdir))
             myl = myf.readlines()
             myf.close()
         except IOError:
diff --git a/repoman/lib/repoman/repos.py b/repoman/lib/repoman/repos.py
index d89e050..6a929f3 100644
--- a/repoman/lib/repoman/repos.py
+++ b/repoman/lib/repoman/repos.py
@@ -4,6 +4,7 @@
 import io
 import logging
 import re
+import shlex
 import sys
 import textwrap
 
@@ -190,7 +191,7 @@ class RepoSettings:
         # or PORTDIR_OVERLAY settings.
         self.repoman_settings["PORTDIR_OVERLAY"] = "%s %s" % (
             self.repoman_settings.get("PORTDIR_OVERLAY", ""),
-            portage._shell_quote(portdir_overlay),
+            shlex.quote(portdir_overlay),
         )
         self.repositories = self.repo_conf.load_repository_config(
             self.repoman_settings, extra_files=[tmp_conf_file]
