From what I understand, you want to have a portable lazarus installation.
If I'm wrong, correct me please.
I also had this problem and after not finding a good solution, I wrote a program that you can put into a folder with lazarus and it keeps the configuration and so on updated, even if the path changes, so you can put lazarus on a usb stick and run it directly from there.
Here is the program:
https://github.com/JoeJoeTV/startLazarusPortableIt is currently only for Windows, but I may update it to work on linux.
To use it, just copy the files from a fresh install or an old installation into the same directory. The config directory will be "LazarusConfig" in the same direcotry.
To start lazarus, you run the "startLazarusPortable.exe".
This program modifies the config files of lazarus and the fpc compiler, so if you have modified these, test first if everything works with a copy.