‘history -d linenumber’ does not delete the numbered item

I am using bash, on Ubuntu 18.04, kernel version 5.4.0-150-generic. To delete history item 83838, I type

history -d 83838

but nothing seems to happen. It is still there when I enter history again.

If that had worked, I would also use history -w, to write the current history to file, but I never got that far.

My history is very long. Might that have anything to do with it?

I also have an alias that runs history | sort -k2 -k1,1nr | uniq -f1 | sort -n | cut -f, which I mostly use. However, I am not using that in this instance.