def clean_jupyter():
    try:
        conn.sudo('systemctl stop jupyter-notebook')
        conn.sudo('pip3 uninstall -y notebook jupyter')
        conn.sudo('rm -rf /usr/local/share/jupyter/')
        conn.sudo('rm -rf /home/{}/.jupyter/'.format(args.os_user))
        conn.sudo('rm -rf /home/{}/.ipython/'.format(args.os_user))
        conn.sudo('rm -rf /home/{}/.ipynb_checkpoints/'.format(args.os_user))
        conn.sudo('rm -rf /home/{}/.local/share/jupyter/'.format(args.os_user))
        conn.sudo('rm -f /etc/systemd/system/jupyter-notebook.service')
        conn.sudo('systemctl daemon-reload')
    except Exception as err:
        print('Error: {0}'.format(err))
        sys.exit(1)
def clean_jupyter():
    try:
        conn.sudo('systemctl stop jupyter-notebook')
        conn.sudo('pip3 uninstall -y notebook jupyter')
        conn.sudo('rm -rf /usr/local/share/jupyter/')
        conn.sudo('rm -rf /home/{}/.jupyter/'.format(args.os_user))
        conn.sudo('rm -rf /home/{}/.ipython/'.format(args.os_user))
        conn.sudo('rm -rf /home/{}/.ipynb_checkpoints/'.format(args.os_user))
        conn.sudo('rm -rf /home/{}/.local/share/jupyter/'.format(args.os_user))
        conn.sudo('rm -f /etc/systemd/system/jupyter-notebook.service')
        conn.sudo('systemctl daemon-reload')
    except Exception as err:
        print('Error: {0}'.format(err))
        sys.exit(1)