Will apt install nginx-custom break Current config?

I need to update the builtin mod_pagespeed but since it’s compiled, I need to reinstall nginx. Can you reinstall nginx without overwriting the Current config or should I do it on a new server and setup everything again?

I don’t use EE, just the repo.