def clean_deeplearning():
    try:
        conn.sudo('systemctl stop ungit')
        conn.sudo('systemctl stop inactive.timer')
        conn.sudo('rm -f /etc/systemd/system/inactive.service')
        conn.sudo('rm -f /etc/systemd/system/inactive.timer')
        conn.sudo('rm -rf /opt/inactivity')
        conn.sudo('npm -g uninstall ungit')
        conn.sudo('rm -f /etc/systemd/system/ungit.service')
        conn.sudo('systemctl daemon-reload')
        remove_os_pkg(['nodejs', 'npm'])
        conn.sudo('sed -i "/spark.*.memory/d" /opt/spark/conf/spark-defaults.conf')
        clean_jupyter()
    except Exception as err:
        print('Error: {0}'.format(err))
        sys.exit(1)
def clean_deeplearning():
    try:
        conn.sudo('systemctl stop ungit')
        conn.sudo('systemctl stop inactive.timer')
        conn.sudo('rm -f /etc/systemd/system/inactive.service')
        conn.sudo('rm -f /etc/systemd/system/inactive.timer')
        conn.sudo('rm -rf /opt/inactivity')
        conn.sudo('npm -g uninstall ungit')
        conn.sudo('rm -f /etc/systemd/system/ungit.service')
        conn.sudo('systemctl daemon-reload')
        remove_os_pkg(['nodejs', 'npm'])
        conn.sudo('sed -i "/spark.*.memory/d" /opt/spark/conf/spark-defaults.conf')
        clean_jupyter()
    except Exception as err:
        print('Error: {0}'.format(err))
        sys.exit(1)