Jump to content
Froxlor Forum
  • 0

Uninstall unused PHP-versions


techie204

Question

I wanted to clean up our system today since we only use one php-version (now 8.0). Unfortunately I cannot delete 7.4 since it would uninstall froxlor package also. From what I found I assume the dependency of froxlor to php-cgi is relevant!? But why isn't it using the php8.0-cgi package? Or do I miss something?

# apt remove php7.4*
The following packages will be REMOVED:
  froxlor libapache2-mod-php7.4 php7.4 php7.4-bcmath php7.4-cgi php7.4-cli
  php7.4-common php7.4-curl php7.4-gd php7.4-imap php7.4-json php7.4-mbstring
  php7.4-mysql php7.4-opcache php7.4-readline php7.4-xml php7.4-zip

I don't actually know if it has something to do with this, but had problems with meta-packages before and can't figure this one out now:

# apt depends froxlor --installed
...
|Depends: php-cgi (>= 1:7.1)
...

Anyway, how can I uninstall the old PHP version without uninstalling froxlor!?

Link to comment
Share on other sites

Recommended Posts

  • 0
8 minutes ago, d00p said:

Well this does not happen if you stick to the default distribution apt.sources....this is definetly a debian/apt topic you can google how to avoid installing newer major versions of specific packages

Ok, thanks for the answer. In my case this would be:

apt-mark hold php

I just don't get it, why other software does not have this issue, although dependencies are similar (php is needed, but php8.1 is enough to have). That's why I have oen step more now 🙂 It might also only be a problem in my head and I'll leave it like that 😄

Link to comment
Share on other sites

  • 0
14 minutes ago, techie204 said:

(php is needed, but php8.1 is enough to have).

should be the same for the froxlor package but what you did was trying to remove the META package...not a specific version

Link to comment
Share on other sites

  • 0

Mh, I don't get it 😄 what do you mean with "...not a sepecific version". I have the impression, I can't make myself clear or misunderstand something in generel.

Yes I was trying to remove the meta-package, because I already have a specific version installed. What I wished for is:

- I do install php8.1 and corresponding packages php8.1-{...}
- when I install froxlor, there is a dependency for php, e.g. >= 7.4
- when php8.1 is installed, then the dependency is met and NOT reliant on the installed meta-package

On another server I do have a software installed with this dependency. I have also different versions of php installed (7.4, 8.0, 8.1), but not the meta-package (which is depending 8.1). The software checks, whether php{x.y} is installed and finds a version >= 7.4, therefore the dependency is met.

Maybe I found something more here:

# apt depends froxlor
froxlor
 |Depends: apache2
...
 |Depends: php (>= 1:7.1)
 |Depends: php-cgi (>= 1:7.1)
  Depends: php-fpm (>= 1:7.1)
  Depends: php-cli
    php5.6-cli
    php7.0-cli
    php7.1-cli
    php7.2-cli
    php7.3-cli
    php7.4-cli
    php8.0-cli
    php8.1-cli
...

For e.g. php-cli, the other packages are referenced. And for all the php-{*} packages the meta-apckages are not needed, but the version like php8.1-cli are enough. Is it maybe here, that for php-package it is not sufficient to have php8.1 installed as with the others, because they are not in the list like that!?

Link to comment
Share on other sites

  • 0

we can't just specifiy the meta package as we require a specific minimum php-version. All the packages I've checked that somehow depend on php never specify a mininum required version. This might work for us most of the time but not if you e.g. just have php7.0 installed (which you have the liberty to do!).

I'm not a debian/apt packaging pro - I'm sure the package is not perfect but I don't know any other way to do what we require as for now, sorry.

Link to comment
Share on other sites

  • 0
2 minutes ago, d00p said:

we can't just specifiy the meta package as we require a specific minimum php-version. All the packages I've checked that somehow depend on php never specify a mininum required version. This might work for us most of the time but not if you e.g. just have php7.0 installed (which you have the liberty to do!).

I'm not a debian/apt packaging pro - I'm sure the package is not perfect but I don't know any other way to do what we require as for now, sorry.

No problem, thanks for your work! I also do not want to overcomplicate things and I am not a pro in any of this 😄 sorry.

What I would wonder is now the difference for the above mentioned packages php and php-cli (and maybe also php-fpm)-> all are required from froxlor, but with cli and fpm it is enough to have php8.1-* installed, with php not -> that seems strange. Maybe somebody else knows one day why this is like that 🙂 thanks anyway for the help!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • Create New...