remove child from firebase swift

Swift
  // Remove the post from the DB
  ref.child("posts").child(postId).removeValue { error in
    if error != nil {
        print("error \(error)")
    }
  }

Source

Also in Swift: