function clearoct (filename)
  
  autoloads = autoload ();
  idx = ! cellfun ("isempty", strfind ({autoloads.file}, filename));
  fns = {autoloads(idx).function};
  for i = 1:numel (fns)
    clear ("-f", fns{i});
  endfor
  [~, fn, ~] = fileparts (filename);
  clear ("-f", fn);

endfunction
