Skip to content

Instantly share code, notes, and snippets.

@imnotdev25
Created February 28, 2024 04:15
Show Gist options
  • Save imnotdev25/1686fe867698e5996b1e94f9a07a6fd5 to your computer and use it in GitHub Desktop.
Save imnotdev25/1686fe867698e5996b1e94f9a07a6fd5 to your computer and use it in GitHub Desktop.
Remove compiled python ( i.e. make install )
prefix='/usr/local/' # Path $~ which pythonx.x.
pyver='3.6' # Python version x.x
# Warning Don't remove system python3 otherwise linux system can crash
rm -rf \
$HOME/.local/lib/Python${pyver} \
${prefix}bin/python${pyver} \
${prefix}bin/python${pyver}-config \
${prefix}bin/pip${pyver} \
${prefix}bin/pydoc \
${prefix}bin/include/python${pyver} \
${prefix}lib/libpython${pyver}.a \
${prefix}lib/python${pyver} \
${prefix}lib/pkgconfig/python-${pyver}.pc \
${prefix}lib/libpython${pyver}m.a \
${prefix}bin/python${pyver}m \
${prefix}bin/2to3-${pyver} \
${prefix}bin/python${pyver}m-config \
${prefix}bin/idle${pyver} \
${prefix}bin/pydoc${pyver} \
${prefix}bin/pyvenv-${pyver} \
${prefix}share/man/man1/python${pyver}.1 \
${prefix}include/python${pyver}m
rm -rI ${prefix}bin/pydoc ## WARN: skip if other pythons in local exist.
@nimttejani
Comment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment