When installing Octave from source, I find that almost always sudo make uninstall does not cleanly undo the effects of sudo make install but leaves several directories behind in the installation directory that I need to go in and delete manually. E.g. for Octave 8 built from dev sources, there are 227 directories left behind out of 2712 files or directories as seen here after an uninstall:
I was pretty sure this was documented behaviour in the GNU standards but I can’t find it there. Anyway, the reason is that while you know which files to remove, there may be other files in those directories that have been added since. There’s also an old thread on automake mailing list about removing empty directories by default which looks like it was ultimately “voted” down.
I’ve always recommended configuring with something like
--prefix=/some/dir/octave/VERSION
then you can easily install multiple versions simultaneously, choose which one to use by setting your PATH appropriately, and completely remove an installed version simply by doing rm -rf /some/dir/octave/VERSION.