• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Question Catastrophic apt-get install removes Plesk??

Paul Larson

Basic Pleskian
Stressful morning tuning a server that has been having load issues.

Plesk Obsidian 18.0.54

Ubuntu 20 (can't get _exact_ version becushe site is currently down).

Anyway, I wanted to install mytop for MySQL troubleshooting.

What do you make of this?

Obviously I missed this in the haste of trying to get things working - but this seems like issuing apt-get install mytop effectively deletes a Plesk installatio.

----

root@host:~# apt-get install mytop
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
libpam-plesk mariadb-client-10.3 mariadb-server mariadb-server-10.3 plesk-backup-utilities plesk-completion plesk-config-troubleshooter plesk-core
plesk-core-utilities plesk-dovecot plesk-dovecot-imap-driver plesk-dovecot-pigeonhole plesk-git-http plesk-l10n plesk-mail-pc-driver
plesk-modsecurity-configurator plesk-mysql-server plesk-repair-kit plesk-resctrl plesk-roundcube plesk-service-node-utilities plesk-task-manager plesk-web-hosting
plesk-web-socket pp18.0.35-bootstrapper psa psa-firewall psa-libxml-proxy psa-locale-base-en-us psa-logrotate psa-mail-driver-common psa-phpmyadmin psa-proftpd

psa-updates psa-vhost
The following NEW packages will be installed:
mytop
0 upgraded, 1 newly installed, 35 to remove and 2 not upgraded.
Need to get 31.1 kB of archives.
After this operation, 418 MB disk space will be freed.
Do you want to continue? [Y/n] y
Get:1 Index of /ubuntu focal/universe amd64 mytop all 1.9.1-4 [31.1 kB]
Fetched 31.1 kB in 0s (1756 kB/s)
(Reading database ... 186930 files and directories currently installed.)
Removing plesk-roundcube (1.4.11-v.ubuntu.20.04+p18.0.35.2+t210526.1158) ...
Removing plesk-web-hosting (18.0-v.ubuntu.20.04+p18.0.35.2+t210526.1158) ...
Removing psa-vhost (18.0-v.ubuntu.20.04+p18.0.35.2+t210526.1158) ...
Removing psa-updates (18.0-v.ubuntu.20.04+p18.0.29.0+t200703.1727) ...
Removing psa-firewall (18.0-v.ubuntu.20.04+p18.0.35.2+t210526.1158) ...
Removing mariadb-server (1:10.3.29-0ubuntu0.20.04.1) ...
Removing plesk-mail-pc-driver (18.0-v.ubuntu.20.04+p18.0.35.2+t210526.1158) ...
Removing psa-mail-driver-common (18.0-v.ubuntu.20.04+p18.0.36.0+t210428.1309) ...
Removing plesk-repair-kit (18.0-v.ubuntu.20.04+p18.0.36.0+t210428.1309) ...
Removing plesk-config-troubleshooter (18.0-v.ubuntu.20.04+p18.0.35.2+t210526.1158) ...
Removing plesk-dovecot-imap-driver (18.0-v.ubuntu.20.04+p18.0.35.2+t210526.1158) ...
Removing plesk-dovecot-pigeonhole (0.5.13-v.ubuntu.20.04+p18.0.35.2+t210526.1158) ...
Removing plesk-dovecot (2.3.13-v.ubuntu.20.04+p18.0.35.2+t210526.1158) ...
Removing plesk-git-http (18.0-v.ubuntu.20.04+p18.0.30.0+t200826.0942) ...
Removing plesk-l10n (18.0-v.ubuntu.20.04+p18.0.35.2+t210526.1158) ...
Removing plesk-modsecurity-configurator (18.0-v.ubuntu.20.04+p18.0.36.0+t210428.1309) ...
Module security2 disabled.
To activate the new configuration, you need to run:
systemctl restart apache2
Removing plesk-resctrl (18.0-v.ubuntu.20.04+p18.0.35.2+t210526.1158) ...
Removing plesk-web-socket (18.0-v.ubuntu.20.04+p18.0.35.2+t210526.1158) ...

Removing psa-proftpd (1.3.7a-v.ubuntu.20.04+p18.0.35.2+t210526.1158) ...
Removing plesk-core (18.0-v.ubuntu.20.04+p18.0.35.2+t210526.1158) ...
Removing libpam-plesk (18.0-v.ubuntu.20.04+p18.0.35.2+t210526.1158) ...
Removing psa-phpmyadmin (5.1.0-v.ubuntu.20.04+p18.0.35.2+t210526.1158) ...
Removing plesk-backup-utilities (18.0-v.ubuntu.20.04+p18.0.35.2+t210526.1158) ...
Removing plesk-service-node-utilities (18.0-v.ubuntu.20.04+p18.0.35.2+t210526.1158) ...
Removing plesk-completion (18.0-v.ubuntu.20.04+p18.0.35.2+t210526.1158) ...
Removing plesk-core-utilities (18.0-v.ubuntu.20.04+p18.0.35.2+t210526.1158) ...
Removing plesk-task-manager (18.0-v.ubuntu.20.04+p18.0.35.2+t210526.1158) ...
dpkg: warning: while removing plesk-task-manager, directory '/opt/psa/var/task-manager' not empty so not removed
Removing psa-logrotate (3.8.2-v.ubuntu.20.04+p18.0.29.0+t200703.1727) ...
Removing psa-locale-base-en-us (18.0-v.ubuntu.20.04+p18.0.35.2+t210526.1158) ...
Removing psa-libxml-proxy (2.9.7-v.ubuntu.20.04+p18.0.29.0+t200703.1727) ...
Removing psa (18.0.35-v.ubuntu.20.04+p18.0.35.2+t210526.1158) ...
Removing pp18.0.35-bootstrapper (18.0-v.ubuntu.20.04+p18.0.35.2+t210526.1158) ...
Removing plesk-mysql-server (18.0-v.ubuntu.20.04+p18.0.32.0+t201127.2203) ...
Removing mariadb-server-10.3 (1:10.3.29-0ubuntu0.20.04.1) ...
Removing mariadb-client-10.3 (1:10.3.29-0ubuntu0.20.04.1) ...
Selecting previously unselected package mytop.
(Reading database ... 158865 files and directories currently installed.)
Preparing to unpack .../archives/mytop_1.9.1-4_all.deb ...
 
To Plesk team:

Here another issue ... this time concerning a component uninstall.


Probably not related, but just letting you know in case it does seem to be related.

Seems strange that a 'foreign' component (un)install leads to Plesk components being removed.
 
The issue stems from dependency resolution.

If a package conflicts with another, you may be prompted to remove/uninstall it. If another package depends on the package you just removed, it'll need to be removed to (it doesn't need to be removed, but package managers like yum will do this. rpm -e --nodeps can be used as a workaround). In this case, I'm guessing mytop marks mariadb as a conflict (can confirm this based on the error I'm getting on running yum install mytop) and tries to remove it, which leads to the removal of the entire dependency chain.
 
While the logic of that makes sense, it remains unsettling that a system can be rendered useless by an innocent apm-get install. Took down an entire website/server of a large customer today.
 
While the logic of that makes sense, it remains unsettling that a system can be rendered useless by an innocent apm-get install. Took down an entire website/server of a large customer today.
You could say that about any command. rf -rf? find -delete? dd? echo? There are a million fun ways you could destroy a server. apt-get/yum is far from innocent. If you run apt-get remove apache2 what would happen?
 
I stand corrected. The conflict on RHEL-based systems was related to this bug - not a dependency issue.
 
You could say that about any command. rf -rf? find -delete? dd? echo? There are a million fun ways you could destroy a server. apt-get/yum is far from innocent. If you run apt-get remove apache2 what would happen?
That is a lot of WHAT IFS. What if your hosting company burns to the ground?

I agree with @Paul Larson that a simple component (un)install should never lead to an unintended uninstall of a complete servermanagement system. There should be some sort of protection mechanism in place. In situations like this (also the link I provided) a big warning message should appear:

Bash:
WARNING - YOU ARE ABOUT TO UNINSTALL IMPORTANT PLESK COMPONENTS!

Are you sure you want to continue? y/n

I stand corrected. The conflict on RHEL-based systems was related to this bug - not a dependency issue.
Either way ... some sort of protection mechanism to prevent Plesk being unintendedly uninstalled would be highly prefered.
 
Either way ... some sort of protection mechanism to prevent Plesk being unintendedly uninstalled would be highly prefered.
This is not a Plesk issue. Running apt-get remove apache2 would yield the same result. Maybe a sanity check can be built into the plesk installer, but that's extremely limited and doesn't prevent the above issue.

On any system, if you remove a necessary dependency, you either remove all the components that depend on it or end up with a broken system. The former is usually preferable. If you did yum remove bash you'd probably break a whole lot more than just Plesk. Short of modifying how package managers work (horrible idea) - this isn't remotely a Plesk problem.

FWIW, there is a prompt built into package managers.

Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
libpam-plesk mariadb-client-10.3 mariadb-server mariadb-server-10.3 plesk-backup-utilities plesk-completion plesk-config-troubleshooter plesk-core
plesk-core-utilities plesk-dovecot plesk-dovecot-imap-driver plesk-dovecot-pigeonhole plesk-git-http plesk-l10n plesk-mail-pc-driver
plesk-modsecurity-configurator plesk-mysql-server plesk-repair-kit plesk-resctrl plesk-roundcube plesk-service-node-utilities plesk-task-manager plesk-web-hosting
plesk-web-socket pp18.0.35-bootstrapper psa psa-firewall psa-libxml-proxy psa-locale-base-en-us psa-logrotate psa-mail-driver-common psa-phpmyadmin psa-proftpd

psa-updates psa-vhost
The following NEW packages will be installed:
mytop
0 upgraded, 1 newly installed, 35 to remove and 2 not upgraded.
Need to get 31.1 kB of archives.
After this operation, 418 MB disk space will be freed.
Do you want to continue? [Y/n] y
The user entered yes, so apt removed the packages. They were warned.

That is a lot of WHAT IFS. What if your hosting company burns to the ground?

I agree with @Paul Larson that a simple component (un)install should never lead to an unintended uninstall of a complete servermanagement system. There should be some sort of protection mechanism in place. In situations like this (also the link I provided) a big warning message should appear:
You're welcome to contact the maintainers of these package managers. I can tell you you won't get far. Any command can be dangerous. Especially operations that remove something. And yes, it is a lot of WHAT IFS - there's a whole lot that can go wrong and should be planned for :)
 
Last edited:
@john0001

I'm afraid you are right haha :)

Would be cool though if Plesk would analyze the outcome of the yum/dnf/apt (un)install command and if it contains plesk components then show the warning. But probably I'm dreaming :)

Plesk has a GUI and recommends to use it for (un)installing components. Using commandline is more risky.

You're welcome to contact the maintainers of these package managers. I can tell you you won't get far.

I think you're right about that LOL
 
You could say that about any command. rf -rf? find -delete? dd? echo? There are a million fun ways you could destroy a server. apt-get/yum is far from innocent. If you run apt-get remove apache2 what would happen?

I expect "rm -rf /" to delete everything on my root partition.

I expect "apt-get remove apache2" to remove apache2.

I don't, however "apt-get install mytop" to do anything besides installing mytop, or complain about failed dependencies.

It's hard to classify "apt-get install XYZ" in the same category of danger as "rm -rf /", otherwise I've been incredibly lucky over the decades when I use package managers to install monit, imagemagick, libssh2-devel, etc.

However, I'm far from an expert on package managers, and completely agree this is not a Plesk issue. Ubuntu, maybe?

I'm mainly glad I could source the problem back to the install attempt of mytop. Learned a very hard lesson on that one.

Thanks for the insights!
 
Yeah - best way to learn is by doing :) - just not on production

I expect "rm -rf /" to delete everything on my root partition.
I get where you're coming from. But Linux is supposed to be operated with the understanding that you know what the command/operation you run can/is supposed to do and the implications. It does note that there are dependency issues and offers to remove them - hence the y/n prompt.

I appreciate you sharing your experience though - maybe you could document the steps you took to restore everything for future users?
 
Hey, i'm the OP on the link mentioned in this thread. While I agree with all that was said here, I'd like to add that in my case I was using the Plesk installer and not apt-get directly.

So while Plesk may not be able to monitor what other apps are doing to the system, I believe at least its own installer could throw a warning as suggested by @Pleskie . In my case Plesk ended up uninstalling itself when I specifically requested to uninstall Dovecot only.
 
That's the rub. There was no Y/N prompt. The only command issued was:

apt-get install mytop

And next thing I know: broken server.

Not to over-toot my horn; but I've managed Linux/Plesk servers for 15 years, installing countless packages with Ubuntu and CentOS. Never have I bricked a Plesk install even with my most over-zealous cowboy-coding moments on staging or production.

Learn-by-doing is fine and understood, but what I've learned by apt-get or yum install has not been: get ready to destroy your Plesk install.

(By no means am I trying to start an argument, this was just a nasty surprise)
 
But the output you pasted shows otherwise:

root@host:~# apt-get install mytop
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
libpam-plesk mariadb-client-10.3 mariadb-server mariadb-server-10.3 plesk-backup-utilities plesk-completion plesk-config-troubleshooter plesk-core
plesk-core-utilities plesk-dovecot plesk-dovecot-imap-driver plesk-dovecot-pigeonhole plesk-git-http plesk-l10n plesk-mail-pc-driver
plesk-modsecurity-configurator plesk-mysql-server plesk-repair-kit plesk-resctrl plesk-roundcube plesk-service-node-utilities plesk-task-manager plesk-web-hosting
plesk-web-socket pp18.0.35-bootstrapper psa psa-firewall psa-libxml-proxy psa-locale-base-en-us psa-logrotate psa-mail-driver-common psa-phpmyadmin psa-proftpd

psa-updates psa-vhost
The following NEW packages will be installed:
mytop
0 upgraded, 1 newly installed, 35 to remove and 2 not upgraded.
Need to get 31.1 kB of archives.
After this operation, 418 MB disk space will be freed.
Do you want to continue? [Y/n] y (emphasis mine)
It prompted for confirmation. Yum/apt/dnf/whatever doesn't treat more "important" packages as more "important" and give a more severe warning, unfortunately. There's no way to do that.
 
I never had problems installing some extra things on servers using apt-get. But just out of curiosity I fired up the terminal and ran "apt-get install mytop", and then OH SH@@@

root@cloud03:~# apt-get install mytop
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
libpam-plesk mariadb-client-10.3 mariadb-server mariadb-server-10.3 plesk-backup-utilities plesk-completion plesk-config-troubleshooter plesk-core plesk-core-utilities plesk-dovecot plesk-dovecot-imap-driver
plesk-dovecot-pigeonhole plesk-l10n plesk-mail-pc-driver plesk-modsecurity-configurator plesk-mysql-server plesk-repair-kit plesk-resctrl plesk-roundcube plesk-service-node-utilities plesk-task-manager plesk-web-hosting
plesk-web-socket pp18.0.35-bootstrapper psa psa-firewall psa-libxml-proxy psa-locale-base-en-us psa-logrotate psa-mail-driver-common psa-phpmyadmin psa-proftpd psa-updates psa-vhost
The following NEW packages will be installed:
mytop
0 upgraded, 1 newly installed, 34 to remove and 2 not upgraded.
Need to get 31.1 kB of archives.
After this operation, 418 MB disk space will be freed.
Do you want to continue? [Y/n]
What in the world? The Plesk team should take a look at this, why installing mytop is causing all the Plesk packages to be removed?

Luckily I never had to use mytop before (didn't even knew about it, TBH). So thanks for the heads up @Paul Larson , had I tried installing this I would have fried a server as well.

EDIT: And I just noticed... uninstalling mariadb-server maybe could erase all the databases and tables as well... Oh my...
 
Last edited:
But the output you pasted shows otherwise:


It prompted for confirmation. Yum/apt/dnf/whatever doesn't treat more "important" packages as more "important" and give a more severe warning, unfortunately. There's no way to do that.
Perhaps the terminal pasting context implies a prompt: I assure you there was none. Simply "apt-get install mytop", followed by the return key. No other prompt or user input offered.
 
It's not a Plesk issue. MyTop doesn't like MariaDB, so it tries to remove it, which kicks of a dependency chain leading to the removal of Plesk.

Here's an example (fresh ubuntu install):

Code:
# apt-get install mariadb-server
# dpkg -S mysql-server
mariadb-server-10.1: /etc/logrotate.d/mysql-server
# apt-get install mytop
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  galera-3 grub-pc-bin libaio1 libhtml-template-perl libjemalloc1 mariadb-client-core-10.1 mariadb-common
  mariadb-server-core-10.1 socat
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
  mariadb-client-10.1 mariadb-server mariadb-server-10.1
The following NEW packages will be installed:
  mytop
0 upgraded, 1 newly installed, 3 to remove and 88 not upgraded.
Need to get 31.1 kB of archives.
After this operation, 121 MB disk space will be freed.
Do you want to continue? [Y/n]
 
Perhaps the terminal pasting context implies a prompt: I assure you there was none. Simply "apt-get install mytop", followed by the return key. No other prompt or user input offered.
Did you pass the -y flag? Or hit return twice?
 
Not to over-toot my horn; but I've managed Linux/Plesk servers for 15 years, installing countless packages with Ubuntu and CentOS. Never have I bricked a Plesk install

Still thinking this over ... over the years I have installed many hundreds of components as well. Never did this result in uninstalling Plesk components.

I still think it is strange that an install of something could cause an uninstall of something else. I know the other way round can happen. You install a component and this component needs other components to be installed or updated.

If a package conflicts with another, you may be prompted to remove/uninstall it.

I wonder if this is true (under normal circumstances). If the package to be installed conflicts with another package ... why whould it use that conflicting package in the first place? Why wouldn't it just ignore that package? Does not make very much sense I would say. It could conflict with the version of the specific package because it is too old. But then the resolution would be to update that package. Not to remove it.

It's not a Plesk issue. MyTop doesn't like MariaDB, so it tries to remove it, which kicks of a dependency chain leading to the removal of Plesk.

Is this an Ubuntu issue maybe?
 
Back
Top