Upgrading the OS is not supported by Raspbian nor RetroPie. You probably have found some instructions on how to upgrade using apt and updating its configuration files in /etc/apt, but it's not a recommended process, especially for a beginner.
If you wish to use an up-to-date/current version, use the image from http://retropie.org.uk/download. We don't support 3rd party image, as outlined in https://retropie.org.uk/forum/topic/3/read-this-first.