My .bashrc has this:
enable-pyenv () {
# Load pyenv automatically by adding
# the following to your profile:
export PATH=\"$HOME/.pyenv/bin:$PATH\"
I'm not sure that this will get rid of all traces of pyenv, but editing your $PATH
environment variable to get rid of the pyenv- or shim-containing paths seems to deactivate pyenv. Eg,
export PATH=`echo $PATH | python -c "import sys, re; print(':'.join(x for x in sys.stdin.read().strip().split(':') if not 'pyenv' in x))"`
If you want to be able to re-enable it, just store your previous $PATH
so you can restore it later.