You can query DBA_SOURCE, or maybe better would be DBA_OBJECTS.....
Then you can drop package/function/procedure....
we also have CREATE OR REPLACE syntax - which will avoid the 'object already exists' errors - will that give you what you want? zero coding required
This forum is for Sql Developer questions only and NOT for Sql or PL/SQL questions.
The forum title used to say exactly that but for some reason it changed in the last few weeks.
Please mark the thread ANSWERED and repost in the SQL and PL/SQL forum
Oracle is NOT sql server. You will have a LONG, SLOW road if you just try to push through things without reading the documentation first.
If you want to learn about creating procedures then the obvious thing to do is read the documentation for that.
A simple internet search for 'oracle 11g create procedure' has this link as the very first result
There is typically a detailed SYNTAX diagram that shows ALL possible options and then explanatory text that explains each of the syntax elements.
That link has this text:
REPLACEto re-create the procedure if it already exists. Use this clause to change the definition of an existing procedure without dropping, re-creating, and regranting object privileges previously granted on it. If you redefine a procedure, then the database recompiles it.
Users who had previously been granted privileges on a redefined procedure can still access the procedure without being regranted the privileges.
If any function-based indexes depend on the package, then the database marks the indexes
It took me less than a minute to find that doc and text using a search string that include only 4 words.
If you need more help please repost the question in the sql forum.
I strongly suggest that you search that SQL forum and the general database forum with the words 'SQL SERVER' in the search terms and read the MANY threads people have posted about sql server to Oracle conversions and the common mistakes almost all of them seem to make.
You will save yourself a lot of time if you do that sort of research first.