code: def remove_aliases(target):
      
  
      if isinstance(target, model.Entry):
          orm.delete(p for p in model.PathAlias if p.entry == target)
      elif isinstance(target, model.Category):
          orm.delete(p for p in model.PathAlias if p.category == target)
      else:
          raise TypeError("Unknown type {}".format(type(target)))
      orm.commit()
docs: Remove all aliases to a destination