The recommended way to upgrade is to write a stable disk image to the sd card. If you want to get the latest changes, or upgrade without reimaging, see upgrading from git
Before upgrading with a new disk image, it is advised to backup the pypilot.conf file, and copy it back again. If you are upgrading through a package manager this is not an issue.
All of the pypilot settings are stored in a small text file pypilot.conf. This file is in json format and can be edited with a text editor.
Copy this file somewhere before overwriting the disk image, and copy it back afterwards.
If you do not, it will be a fresh pypilot without calibration and you will need to recalibrate and adjust all of the settings again.