I've encountered this issue in the past and I'm currently encountering it again on my desktop, but not my laptop for whatever reason. How can a package be marked for upgrade and flagged as no longer needed at the same time? If a package is no longer needed, what's the purpose of marking it for upgrade?
The following package was automatically installed and is no longer required:
icedtea-netx
Use 'sudo apt autoremove' to remove it.
The following packages will be REMOVED:
icedtea-8-plugin icedtea-netx-common
The following packages will be upgraded:
icedtea-netx
1 upgraded, 0 newly installed, 2 to remove and 0 not upgraded.
Need to get 0 B/1,637 kB of archives.
After this operation, 435 kB disk space will be freed.