Well, not really…But stick with me because we’re talking about an important topic here that might jeopardise your entire APEX installation.
Typically, whenever you install a new version of APEX over the top of a pre-existing version, after an amount of time when you’re happy with the functionality and regression testing of your new version, you will want to remove the old version to stop it from cluttering up your data dictionary.
The issue at hand here is that when you do a simple Google search for how to clean up an APEX installation, the first result that often pops up is a link to the APEX removal section of the documentation.

Once you jump to that link and have a look at the instructions it all seems fairly straightforward. You simply log on as a SYSDBA and run the APEX removal script.

Unfortunately, that is absolutely the worst thing to do. That script is for completely removing APEX installations from your system. And when you run it, it will quite happily remove the current APEX installation from your database; you’ve just upgraded to.
SQL> select username 2 from dba_users 3 where username like 'APEX%';USERNAME--------------------APEX_260100 <<<=== current versionAPEX_PUBLIC_ROUTERAPEX_PUBLIC_USERAPEX_240200SQL> @apxremov.sqlPL/SQL procedure successfully completed.PL/SQL procedure successfully completed....Removing Oracle APEX...set_appun.sql[snip]********************************************************************** You must exit this SQL*Plus session before running apexins.sql **********************************************************************SQL> select username 2 from dba_users 3 where username like 'APEX%';USERNAME--------------------APEX_PUBLIC_ROUTERAPEX_PUBLIC_USERAPEX_240200
There is indeed a dedicated section in the documentation for how to remove the old version of APEX under the post upgrade instructions.

But unfortunately, depending on your phrasing, Google and other search engines and also AI assistants tend to push you toward the APEX removal script as opposed to the instructions to correctly drop just the old version.
We do have some plans on the roadmap to tidy this up such that you won’t ever inadvertently drop your current version of APEX, but in the meantime just make sure you don’t run APEX removal unless you definitely want to clean up the current APEX installation from your database.




Leave a Reply