One way might be to use ecto query
import Ecto.Query
"users_organizations"
|> where(user_id: ^user_id)
|> where(organization_id: ^organization_id)
|> Repo.delete()
or if you have the id
of the pair
import Ecto.Query
"users_organizations"
|> where(id: ^users_organization_id)
|> Repo.delete()