How to turn pasta sauce into a longer-lasting ketchup?
Ketchup keeps because it is full of sugar (reduces water activity) and vinegar (acid, keeps microbes and especially molds at bay). A boatload of both. Look at a ketchup recipe for reference...