I had the same issue, and i was not sure what i can safely uninstall using opkg.. so:
I did the new YunSysupgrade install (if you have already done it before - you can just reset your YUN by holding down the Arduino’s WiFi reset button for more than 30 seconds ) and THEN run the new version of the YunDiskSpaceExpander script.
It's the space that's on the internal flash file system that is the issue. You Linux system volume is (almost) full and there isn't room to install the utilities necessary to format and setup the SD card. It's probably not too surprising to hear that your system volume is full, since you're trying to make room there, you've probably noticed you're running out of room.
If you created any large data files or log files on the Linux side (on the internal file system, not saved to an SD card) then try deleting some of them. Or if you installed some large software packages (probably using opkg) remove some.
Run the "df -h" command on the Linux side, and make sure you have at least 1 MB of free memory on the root ("/") volume before trying the expander sketch again.
Or, you can do as miticv suggests, which will delete everything and return back to the factory default state, at which point you will have lots of free space.
I tried to perform the SDcard expansion but I'm encountering an error:
You don't have enough disk space to install the utility software. You need to free at least 1MB of Flash memory.
Retry!
I removed installed packages using opkg remove package
performed the "./reset-to-factory-anyway procedure", and
rebooted my Yun Rev2
and the message of "You don't have enough disk space to install..." continues.
What else I can do for overcoming this issue?
Also when I perform the "./reset-to-factory-anyway" procedure this prompt appears:
" message /dev/mtdblock5 is mounted as /overlay, only erasing files"