Bitcoin Core - Go back to a specific block? I have a full node of Bitcoin Core wallet. I would like to know if it's possible to delete data after a certain block. For example Bitcoin is currently at block 504385. There was a fork around block 500000 and I would delete all block data after that so I can use the blockchain data I have with the new fork wallet.
You can't delete the block data themselves, but you can reset the blockchain state to a specific block by using the invalidateblock command. This command will mark a specific block and its descendants as invalid thus setting the chainstate to the block immediately before it. Note that this may not necessarily work to switch to a blockchain fork and may still not be able to use the forked blockchain.

If you want to go back to the 500,000th block, you would invalidate the 500,001st block with the call invalidateblock 0000000000000000005c9959b3216f8640f94ec96edea69fe12ad7dee8b74e92. By invalidating the 500,001st block the chainstate resets to height 500,000.