You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何卸载Oracle Database Express Edition?求助排查系统未卸载残留内容

How to Uninstall Oracle Database Express Edition (XE) & Clean Up Leftovers

Hey there! Let's break down the proper way to uninstall Oracle XE and make sure you don't leave any stray files, settings, or services lingering on your system. I'll cover both Windows and Linux since the steps differ a bit.

Uninstall Steps for Windows

  • Stop Oracle Services First
    Open the Services console (services.msc via Run dialog), find all services starting with Oracle (like OracleXETNSListener and OracleServiceXE), right-click each and select Stop.

  • Use the Official Uninstaller
    Go to Control Panel → Programs and Features, locate Oracle Database Express Edition, right-click it and choose Uninstall. Follow the wizard prompts to complete the process.

  • Delete Residual Files & Folders

    • Remove the default installation directory: C:\app\<YourUsername>\product\<VersionNumber>\XE
    • Check for leftover Oracle folders in C:\Program Files\Oracle and C:\ProgramData\Oracle (delete if present)
    • Clean Up the Registry (caution: backup your registry first!)
      Open regedit, then delete these keys:
      • HKEY_LOCAL_MACHINE\SOFTWARE\Oracle (only the XE-related subkeys, or the whole key if no other Oracle products are installed)
      • HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services → all entries starting with Oracle
      • HKEY_CURRENT_USER\Software\Oracle (if exists)

Uninstall Steps for Linux

  • Stop Oracle Services
    Switch to the oracle user:

    su - oracle
    

    Shutdown the database:

    sqlplus / as sysdba
    shutdown immediate;
    exit;
    

    Stop the listener:

    lsnrctl stop
    
  • Run the Official Deinstall Script
    Switch to root user, then execute the deinstall script (default path below, adjust version number as needed):

    /u01/app/oracle/product/18c/XE/deinstall/deinstall
    

    Follow the on-screen prompts to proceed with the uninstall.

  • Clean Up Residuals

    • Delete the Oracle installation directory:
      rm -rf /u01/app/oracle
      
    • Remove the oracle user and associated groups (only if they were created exclusively for Oracle):
      userdel -r oracle
      groupdel oinstall
      groupdel dba
      
    • Remove Oracle-related environment variables from files like /etc/profile, /home/oracle/.bashrc, or /home/oracle/.bash_profile
    • Delete system config files:
      rm -rf /etc/oracle
      rm /etc/oratab
      

Easy-to-Miss Leftovers to Check For

No matter which OS you're using, don't forget these common stray items:

  • Lingering Processes: Use Task Manager (Windows) or ps -ef | grep oracle (Linux) to find and terminate any remaining Oracle processes.
  • Firewall Rules: If you opened port 1521 (default for Oracle) in your firewall, delete the corresponding inbound/outbound rules.
  • Non-Default Data/Log Files: If you stored database files, redo logs, or archive logs in a custom location outside the main installation folder, manually delete those.
  • Shortcuts & Start Menu Entries: (Windows only) Remove any Oracle shortcuts from your desktop and Start Menu.
  • System Configuration Tweaks: (Linux only) Check /etc/sysctl.conf for Oracle-related kernel parameters (like shared memory settings) and remove them if no longer needed.

Take your time verifying each step—missing even one small leftover can cause issues if you ever decide to reinstall Oracle later.

内容的提问来源于stack exchange,提问作者nongjai

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.12 04:17:37