Whilst @DougieLawson is correct w.r.t. software locations for "packaged" software installed via
apt-get,
pip etc. it's not necessarily the case for software built (re-compiled) from source. Where makefiles are in use, such may allow the install destination directory to be somewhere else than the "standard place". Whether one should do so is another matter.
cpc464 wrote:Also there should be plenty of space on the SD card for installing stuff. If you are running out, perhaps consider getting a bigger card, expanding your installation to fill the current card if that has not already been done, or moving application data onto alternative storage.
For example if you had a pi camera taking pictures and putting them in /var/www or whatever, change it to put them on a usb stick instead.
+1 especially for using the USB stick for
data storage - this is more or less what I do with my original, B1, Pi on which I run a wiki, based on a USB stick, to generate and export the "Raspberry Pi parts" of my webpages.
Trev.
Still running Raspbian Jessie or Stretch on some older Pi's (an A, B1, 2xB2, B+, P2B, 3xP0, P0W, 2xP3A+, P3B+, P3B, B+, and a A+) but Buster on the P4B's. See: https://www.cpmspectrepi.uk/raspberry_pi/raspiidx.htm