Why does Raspbian think you have the latest version of
nano when you don't?
I'm guessing you're running Raspbian Jessie. If you are, it turns out that 2.2.6 is the latest version of
nano in the repository, so clearly when APT checks the repository, it finds that you're already up-to-date and doesn't upgrade anything.
Why isn't the version in the repository updated then?
That's down to how Debian's release system works. I'd encourage you to read the second half of my previous answer on a similar topic—essentially, once a release is marked stable, no packages will receive feature updates, ever.
Alright, just tell me how to fix the problem!
Version 2.8.6 is in the buster (testing) repository. Because you're a responsible Debian user and don't want to make a FrankenDebian, you might want to add the backports repository instead to access these packages.
As noted in the documentation:
For stretch add this line
deb http://ftp.debian.org/debian stretch-backports main
to your sources.list (or add a new file with the ".list" extension to /etc/apt/sources.list.d/) You can also find a list of other mirrors at https://www.debian.org/mirror/list
If you want to install something from backports run:
apt-get -t stretch-backports install "package"
If you're still using Jessie, use the instructions before that for
Give that a try with
nano, and hopefully it should be compatible. I've heard that occasionally Debian's repos vary slightly from the official Raspbian repositories, but it should work in this case. Good luck!