This depends a lot on how you installed Cadabra before. Did it come from the Cadabra package in the Ubuntu repositories? Or from an earlier install from source? If you installed from a previous package, you should do
sudo apt remove cadabra2
to remove it (and then re-install from source).
If you installed from source, you will need to do some more work. Typically, when you install from source, and do not pass any installation directory parameters, things go into
/usr/local/lib/python3.x/dist-packages/
(replace python3.x
with the appropriate Python version). For me this contains (among non-cadabra things),
cadabra2.cpython-310-aarch64-linux-gnu.so
cadabra2_defaults.py
cdb_appdirs.py
cadabra2_jupyter/
cdb/
notebook/
(names will differ on a different architecture). Erase all these (both the files and the directories). Then there is also a bunch of cadabra*
binaries in
/usr/local/bin/
Finally, there is a directory
/usr/local/share/cadabra2/
If you erase all this and re-install from source, hopefully things go better.