I dont recommend you ever do this when selling a device. Its not difficult to to update the firmware. So leave that choice up to the buyer. They might want to leave it at 4.xx or 5.xx forever, and might even be specifically looking for a device that comes with older firmware.