How to resolve tasksel 100 error.
Make sure your repository from location /etc/apt/sources.list is your preferred target release. Also remove any .repo files from /etc/apt/sources.list.d/
The original sources.list from Debian 8 looks like below
# cat /etc/apt/sources.list
deb http://ftp.us.debian.org/debian/ jessie main
deb-src http://ftp.us.debian.org/debian/ jessie main
deb http://security.debian.org/ jessie/updates main contrib
deb-src http://security.debian.org/ jessie/updates main contrib
# jessie-updates, previously known as 'volatile'
deb http://ftp.us.debian.org/debian/ jessie-updates main contrib
deb-src http://ftp.us.debian.org/debian/ jessie-updates main contrib
Now we have to use the Apt-Pin feature to get the correct default release tag for our apt downgrade
Modify or create the file /etc/apt/preferences and put following text
# vim /etc/apt/preferences
Package: *
Pin: release a=stable
Pin-Priority: 1001
Note: Replace a=stable with n=wheezy if you are running not the SID but Jessie final release.
Now we just run the below commands to finish the up/downgrade process
# apt-get update
# apt-get upgrade -y
# apt-get dist-upgrade -y
If packages are failing on up/downgrade you might need to purge the package in question
# apt-get purge nginx-extras
And reinstall them with apt-get install nginx-extras after purging it.
# apt-get install nginx-extras
The procedure works for resolving a mixed environment correcting packages installed with multiple repositories.
Enjoy