diff --git a/actions/upgrades b/actions/upgrades index 2ca807f76..4ddfa606d 100755 --- a/actions/upgrades +++ b/actions/upgrades @@ -147,7 +147,11 @@ deb-src {protocol}://deb.debian.org/debian buster-backports main def _check_and_backports_sources(): """Add buster backports sources after checking if it is available.""" - sources_list = '/etc/apt/sources.list.d/freedombox.list' + old_sources_list = '/etc/apt/sources.list.d/freedombox.list' + if os.path.exists(old_sources_list): + os.remove(old_sources_list) + + sources_list = '/etc/apt/sources.list.d/freedombox2.list' if os.path.exists(sources_list): print('Repositories list up-to-date. Skipping update.') return diff --git a/debian/postrm b/debian/postrm index 98fc69274..decc0700f 100755 --- a/debian/postrm +++ b/debian/postrm @@ -14,6 +14,10 @@ purge) rm -f /etc/apt/sources.list.d/freedombox.list fi + if [ -e '/etc/apt/sources.list.d/freedombox2.list' ]; then + rm -f /etc/apt/sources.list.d/freedombox2.list + fi + if [ -e '/etc/apt/preferences.d/50freedombox.pref' ]; then rm -f /etc/apt/preferences.d/50freedombox.pref fi