Recent

Author Topic: Install new .deb over existing Lazarus?  (Read 440 times)

Tomu

  • Jr. Member
  • **
  • Posts: 54
Install new .deb over existing Lazarus?
« on: July 13, 2026, 06:25:01 pm »
I'm running Lazarus 4.2 on Linux Mint. If I download the Lazarus 4.8 deb, can I just have the package manger (sudo apt install...) over the existing installation? Or should I uninstall what I have first?

LeP

  • Guest
Re: Install new .deb over existing Lazarus?
« Reply #1 on: July 13, 2026, 06:36:34 pm »
It's always better to uninstall and delete all folders from old installation ... the new one can have a different folder organization and olds things can broke the compilation.

Alternatives is to install with different paths (but I don't know how to do in Linux).

If you use "fpcupdeluxe" you can install how many release you want in different way.

https://github.com/LongDirtyAnimAlf/fpcupdeluxe/releases/tag/v2.4.0i

CM630

  • Hero Member
  • *****
  • Posts: 1772
  • Не съм сигурен, че те разбирам.
    • http://sourceforge.net/u/cm630/profile/
Re: Install new .deb over existing Lazarus?
« Reply #2 on: July 13, 2026, 08:44:36 pm »
Лазар 4,8 32 bit (sometimes 64 bit); FPC3,2,2

dbannon

  • Hero Member
  • *****
  • Posts: 3882
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Install new .deb over existing Lazarus?
« Reply #3 on: July 14, 2026, 03:42:52 am »
I doubt there is much structural difference between 4.2 and 4.8 if they are both from the official Lazarus repo. If the 4.2 is from the Mint/Ubuntu/Debian repo, definitely remove it first.

From memory, apt can be a bit awkward with installing over an existing one (IFF that is the way you decide to go) so I use gdebi, in its graphic mode has a tick box the do what you want. Its getting pretty old, may not be available for ever.

By the way, just uninstalling the old deb won't remove your configuration, I don't know if the Lazarus deb makers implement the full "full clean", probably not.

Davo
Lazarus 4, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

Thaddy

  • Hero Member
  • *****
  • Posts: 19625
  • Glad to be alive.
Re: Install new .deb over existing Lazarus?
« Reply #4 on: July 14, 2026, 07:16:45 am »
By the way, just uninstalling the old deb won't remove your configuration, I don't know if the Lazarus deb makers implement the full "full clean", probably not.
/users/{$user}/.Lazarus and its files are not removed and /etc/fpc.cfg is not removed. There may be more. Manual environment configuration is of course also not removed. (paths, exports). This is for Debian debs from the standard repositories. There may be more, but that's it, afaik. One file for fpc and one hidden directory for Lazarus.  Both are configuration, so may be on purpose. If you want a clean install, first uninstall both Lazarus and FPC (both separately) with apt (remove or purge, then apt autoremove), remove /etc/fpc.cgg, remove /users/{$user}/.Lazarus. Only then install new..
apt autoremove removes dependencies that are only registered for Lazarus and fpc and that can be quite a lot.
On my machine :
Code: Bash  [Select][+][-]
  1. # purge Debian-installed FPC and Lazarus
  2. sudo apt purge fpc lazarus
  3. # remove unused dependencies and purged package config
  4. sudo apt autoremove --purge
  5. # remove remaining user config. sudo only if they persist.
  6. # check with ls -a ~/
  7. rm -rf ~/.lazarus
  8. rm -f ~/.fpc.cfg
  9. rm -rf ~/.fppkg
  10. # remove remaining global FPC config, if still present and only if you do not have a self build fpc.
  11. # otherwise leave it alone: Lazarus installs ~/.fpc.cfg ~/.fppkg and ~/.Lazarus
  12. sudo rm -f /etc/fpc.cfg
  13. # check /etc for remnants if it is your only fpc/Lazarus install you removed!
  14. # do not remove when you build fpc and Lazarus from source
  15. # if it is your only install remove these too
  16. ls /etc/f*
  17. # finally check again with whereis fpc
  18. whereis fpc
Warning: if you are running Debians (all) in WSL2, do not remove the paths from the environment. They are /mnt/ or /media/ paths to Windows directories.
WSL2 is usually completely hyperV'd and shares all real resources, not like a vm with a virtual disk, like VirtualBox. A cross compiler may need these.

The above is NOT for fpcupdeluxe installs but for installations from the Debian repositories.
« Last Edit: July 14, 2026, 09:47:38 am by Thaddy »
Any "programmer" that knows only one programming language is not a programmer

dbannon

  • Hero Member
  • *****
  • Posts: 3882
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Install new .deb over existing Lazarus?
« Reply #5 on: July 16, 2026, 01:45:27 pm »
/users/{$user}/.Lazarus and its files are not removed and /etc/fpc.cfg is not removed.

Now, just a minute, yes /home/$USER/.lazarus is not removed, but in most cases, the user probably does not want it removed. Lazarus will have a look at it and see if it can import (or update) it and many user settings remain in place. If its too old (and I very much doubt 4.2 -> 4.8 would fit there) Lazarus will tell you so.

And it sure better not remove /etc/fpc.cfg, thats a FPC file.

Davo
Lazarus 4, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

 

TinyPortal © 2005-2018