code: private void deleteDependency(CmsModule module, String dependencyName) {
  
          List oldDependencies = module.getDependencies();
          List newDependencies = new ArrayList();
          Iterator i = oldDependencies.iterator();
          while (i.hasNext()) {
              CmsModuleDependency dep = (CmsModuleDependency)i.next();
              if (!dep.getName().equals(dependencyName)) {
                  newDependencies.add(dep);
              }
          }
          module.setDependencies(newDependencies);
          // update the module information
          try {
              OpenCms.getModuleManager().updateModule(getCms(), module);
          } catch (CmsConfigurationException ce) {
              // should never happen
              throw new CmsRuntimeException(
                  Messages.get().container(Messages.ERR_ACTION_DEPENDENCIES_DELETE_2, dependencyName, module.getName()),
                  ce);
  
          } catch (CmsRoleViolationException re) {
              throw new CmsRuntimeException(
                  Messages.get().container(Messages.ERR_ACTION_DEPENDENCIES_DELETE_2, dependencyName, module.getName()),
                  re);
          }
      }
docs: Deletes a module dependency from a module.<p>
  
  @param module the module to delete the dependency from
  @param dependencyName the name of the dependcency to delete