I want to install only vi in my Ubuntu box. I don't want to install the complete vim package which includes vi. I am trying to reduce the image size of my OS including all the packages so that I have more space to install other packages.
I am open to look into other lightweight text-editor alternatives also but it would be better if I stick with vi.
Busybox contains a light vi implementation. I think you can symlink /usr/bin/vi -> /bin/busybox
or wherever busybox resides in Ubuntu systems. At least this is on my gentoo:
(~) file `which vi`
/usr/bin/vi: symbolic link to ../../bin/busybox
On Ubuntu (16&18 at least) symlink with: ln -s /bin/busybox /bin/vi
If busybox is not installed already it has its own package: apt install busybox