Ubuntu Linux Remove Oracle Express Edition

I know how to install Oracle XE on Debian / Ubuntu Linux. But, how do I remove Oracle Express edition under Ubuntu Linux?

You can use apt-get command to remove / delete Oracle express edition server from the Debian / Ubuntu Linux.

Open terminal.

Type the following command to delete it:
sudo apt-get remove oracle-xe

🐧 Get the latest tutorials on Linux, Open Source & DevOps via RSS feed or Weekly email newsletter.

🐧 10 comments so far... add one

CategoryList of Unix and Linux commands
Disk space analyzersdf ncdu pydf
File Managementcat cp mkdir tree
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network UtilitiesNetHogs dig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04
10 comments… add one
  • RobByrne Apr 24, 2009 @ 14:13

    I think you may have meant rather: sudo apt-get remove oracle-xe

    Also this works (not forgetting the client package): dpkg -r oracle-xe oracle-xe-client

  • 🐧 nixCraft Apr 24, 2009 @ 15:40

    Thanks for the heads up!

  • Han May 6, 2009 @ 3:17

    It’s apt-get remove oracle-xe-universal now. At least it is (or rather, ‘was’) on my Jaunty installation.

  • Nosferatu May 6, 2010 @ 3:08

    Thnk Han, From CR

  • jagan Sep 29, 2010 @ 12:49

    Hi……. Sir,
    I am getting the following Error while uninstaling the Oracle.
    root@yogesh-desktop:/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin# sudo apt-get remove oracle-xe
    Reading package lists… Done
    Building dependency tree
    Reading state information… Done
    Package oracle-xe is not installed, so not removed
    The following packages were automatically installed and are no longer required:
    linux-headers-2.6.32-22 mlock libc-client2007e libqt3-mt linux-headers-2.6.32-22-generic
    Use ‘apt-get autoremove’ to remove them.
    0 upgraded, 0 newly installed, 0 to remove and 21 not upgraded.
    1 not fully installed or removed.
    After this operation, 0B of additional disk space will be used.
    Setting up dkimproxy (1.2-3) …
    addgroup: The group `dkimproxy’ already exists as a system group. Exiting.
    The system user `dkimproxy’ already exists. Exiting.
    * Starting inbound DomainKeys-filter dkimproxy.in Unknown option: hostname
    dkimproxy.in [options] LISTENADDR:PORT RELAYADDR:PORT
    smtp options:

    verification options:

    daemon options:

    dkimproxy.in –help
    to see a full description of the various options

    invoke-rc.d: initscript dkimproxy, action “start” failed.
    dpkg: error processing dkimproxy (–configure):
    subprocess installed post-installation script returned error exit status 2
    Errors were encountered while processing:
    E: Sub-process /usr/bin/dpkg returned an error code (1)

  • Ian Dec 9, 2010 @ 15:01

    I am currently stuck with oracle on my system in order to be able to log in.

    both apt-get and synaptic removal options leave something in Ubuntu 10.04 that is still looking for oracle files that do not exist after removal. It’s not the .bashrc because I removed .bashrc entries for the oracle path. Still Ubuntu fails to load gdm with an error about not finding the oracle files.

    Anyone else had this problem and know the fix can you please add it to this post.

    Thank you

  • Sathish Mar 11, 2011 @ 10:35

    Its too bad. Ther is no way to un-install oracle completely?!!

  • Ian Mar 12, 2011 @ 16:23

    @Sathish apparently something still gets left behind even when I use the option to completely remove in synaptic. It’s been a while since then and maybe some updates have fixed the issue so I’ll try it again this weekend and see if it works. I’ve just been using my Ubuntu system with oracle installed and just never using it. Other than the oracle listener running in the background I don’t think it slows my system by being there. I’m actually working on learning oracle and linux by setting up the unbreakable linux from oracle on it’s own server so I don’t care about this one on my Ubuntu. Still it seems silly to have to just leave it so the rest of the OS can operate.

    I’ll try uninstalling it again later today and see what happens.

  • devsathish Mar 17, 2011 @ 8:30

    @lan, thank you. I did something wrong during the setup. Now Ubuntu doesn’t able to recognize any commands.
    commands like /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/sqlplus are giving No such file or directory… no issues with permissions…
    I’d similar problem in my laptop; After going through many forums,, finally I re-installed the OS itself.

  • DucQuoc.wordpress.com Dec 31, 2011 @ 14:06

    In some new versions of Ubuntu, apt-get remove will not work. We have to use the underlying dpkg of apt-get:

    sudo /etc/init.d/oracle-xe stop
    sudo dpkg -P oracle-xe-universal

    It should remove all config files and /usr/lib/oracle stuff (unless some files, dirs are held by some process).
    To make sure clean uninstallation,

    rm -rf /usr/local/oracle

    Then reboot

    sudo shutdown -r 0

    Now it should be done! You can re-install Oracle xe again:

    sudo dpkg -i oracle-xe*.deb
    sudo /etc/init.d/oracle-xe configure

    good luck,

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre> for code samples. Still have questions? Post it on our forum