Command zypper in apache2 / zypper remove apach2 leaves packages behind

NAME=openSUSE
VERSION=“13.2 (Harlequin)”

Hi

On a freshly installed server without any apache2 packages, I did

zypper in apache2
zypper remove apache2

and expected that all apache2 packages would be gone (again)
However, the following packages were still installed

i | apache2-utils | Apache 2 utilities | package
i | libapr-util1 | Apache Portable Runtime (APR) Library | package
i | libapr1 | Apache Portable Runtime (APR) Library | package
i | liblua5_2 | Small Embeddable Language with Simple Procedural Syntax | package

My expectation is that the two commands above should not left any apache2 packages behind.

Is this a bug or feature ?

Details:

client01:~ # zypper in apache2
Loading repository data…
Reading installed packages…
Resolving package dependencies…

The following 6 NEW packages are going to be installed:
apache2 apache2-prefork apache2-utils libapr-util1 libapr1 liblua5_2

The following recommended package was automatically selected:
apache2-prefork

6 new packages to install.
Overall download size: 1.6 MiB. Already cached: 0 B After the operation, additional 4.7 MiB will be used.
Continue? [y/n/? shows all options] (y): y
Retrieving package libapr1-1.5.1-4.1.3.i586 (1/6), 102.9 KiB (230.4 KiB unpacked)
Retrieving: libapr1-1.5.1-4.1.3.i586.rpm …[done]
Retrieving package liblua5_2-5.2.3-2.2.1.i586 (2/6), 87.1 KiB (202.2 KiB unpacked)
Retrieving: liblua5_2-5.2.3-2.2.1.i586.rpm …[done]
Retrieving package libapr-util1-1.5.3-2.1.4.i586 (3/6), 89.3 KiB (217.6 KiB unpacked)
Retrieving: libapr-util1-1.5.3-2.1.4.i586.rpm …[done]
Retrieving package apache2-utils-2.4.10-8.1.i586 (4/6), 112.7 KiB (197.1 KiB unpacked)
Retrieving: apache2-utils-2.4.10-8.1.i586.rpm …[done]
Retrieving package apache2-2.4.10-8.1.i586 (5/6), 1011.1 KiB ( 3.4 MiB unpacked)
Retrieving: apache2-2.4.10-8.1.i586.rpm …[done]
Retrieving package apache2-prefork-2.4.10-8.1.i586 (6/6), 240.9 KiB (548.7 KiB unpacked)
Retrieving: apache2-prefork-2.4.10-8.1.i586.rpm …[done]
Checking for file conflicts: …[done]
(1/6) Installing: libapr1-1.5.1-4.1.3 …[done]
(2/6) Installing: liblua5_2-5.2.3-2.2.1 …[done]
(3/6) Installing: libapr-util1-1.5.3-2.1.4 …[done]
(4/6) Installing: apache2-utils-2.4.10-8.1 …[done]
(5/6) Installing: apache2-2.4.10-8.1 …[done]
Additional rpm output:
/usr/sbin/suexec2: cannot verify root:root 0755 - not listed in /etc/permissions
Updating /etc/sysconfig/apache2…
looking for old 2.0 modules to be renamed…
Done.

(6/6) Installing: apache2-prefork-2.4.10-8.1 …[done]
client01:~ #

client01:~ # zypper se libapr-util1 libapr1 liblua5_2
Loading repository data…
Reading installed packages…

S | Name | Summary | Type
–±-------------------------±--------------------------------------------------------±-------
i | libapr-util1 | Apache Portable Runtime (APR) Library | package
| libapr-util1-dbd-mysql | DBD driver for MySQL | package
| libapr-util1-dbd-pgsql | DBD driver for PostgreSQL | package
| libapr-util1-dbd-sqlite3 | DBD driver for SQLite 3 | package
| libapr-util1-devel | Apache Portable Runtime (APR) Library | package
i | libapr1 | Apache Portable Runtime (APR) Library | package
| libapr1-devel | Apache Portable Runtime (APR) Library | package
i | liblua5_2 | Small Embeddable Language with Simple Procedural Syntax | package
client01:~ #

client01:~ # zypper se apache | grep ^i
i | apache2 | The Apache Web Server Version 2.4 | package
i | apache2-prefork | Apache 2 “prefork” MPM (Multi-Processing Module) | package
i | apache2-utils | Apache 2 utilities | package
client01:~ #

client01:~ # zypper remove apache2
Loading repository data…
Reading installed packages…
Resolving package dependencies…

The following 2 packages are going to be REMOVED:
apache2 apache2-prefork

2 packages to remove.
After the operation, 3.9 MiB will be freed.
Continue? [y/n/? shows all options] (y): y
(1/2) Removing apache2-2.4.10-8.1 …[done]
(2/2) Removing apache2-prefork-2.4.10-8.1 …[done]
client01:~ #

client01:~ # zypper se apache | grep ^i
i | apache2-utils | Apache 2 utilities | package
client01:~ #

client01:~ # zypper se libapr-util1 libapr1 liblua5_2
Loading repository data…
Reading installed packages…

S | Name | Summary | Type
–±-------------------------±--------------------------------------------------------±-------
i | libapr-util1 | Apache Portable Runtime (APR) Library | package
| libapr-util1-dbd-mysql | DBD driver for MySQL | package
| libapr-util1-dbd-pgsql | DBD driver for PostgreSQL | package
| libapr-util1-dbd-sqlite3 | DBD driver for SQLite 3 | package
| libapr-util1-devel | Apache Portable Runtime (APR) Library | package
i | libapr1 | Apache Portable Runtime (APR) Library | package
| libapr1-devel | Apache Portable Runtime (APR) Library | package
i | liblua5_2 | Small Embeddable Language with Simple Procedural Syntax | package
client01:~ #

Generaly, when you install a package, YaST will find out what other packages are needed for that package to function properly (dependancies). When you de-install the package later, YaST can not be sure if the dependant packages are not needed any more. They may not be needed by any other package, but they may still be needed by either software installed by other means, or even directly by the user.

The fact that the de-installation in your case is done within a few minutes, does not nullify this behaviour.

Those packages may be needed by applications other than Apache, thus they are not automatically removed.

Try; zypper remove -u apache2