You cannot drop the first UDF that also contains the general global function if there is a dependency by other UDFs in the library.
If there is such a dependency, you can drop UDFs in reverse order from which they were created.
If the entire database is deleted, then the entire UDF DLL or SO is deleted without regard to any dependencies existing between UDFs.