Results 1 to 10 of 10

Thread: Zypper - removing packages

  1. #1

    Default Zypper - removing packages

    HI,
    I am cleaning my PC somewhat and have decided that I only need journald so I don;t need rsyslog/syslog/logrotate. I have stop their respective services and have removed the rsyslog and syslog packages.

    However when I go to remove logrotate there are 51 additional packages zypper wants to remove that I find odd, especially Networkmanager and lightdm.

    Code:
    chris@asus-roc:~>$sudo zypper --no-refresh rm logrotate
    Reading installed packages...
    Resolving package dependencies...
    
    The following 51 packages are going to be REMOVED:
      iscsiuio libvirt libvirt-daemon libvirt-daemon-config-network libvirt-daemon-config-nwfilter libvirt-daemon-driver-interface libvirt-daemon-driver-libxl libvirt-daemon-driver-lxc
      libvirt-daemon-driver-network libvirt-daemon-driver-nodedev libvirt-daemon-driver-nwfilter libvirt-daemon-driver-qemu libvirt-daemon-driver-secret libvirt-daemon-driver-storage
      libvirt-daemon-driver-storage-core libvirt-daemon-driver-storage-disk libvirt-daemon-driver-storage-iscsi libvirt-daemon-driver-storage-iscsi-direct libvirt-daemon-driver-storage-logical
      libvirt-daemon-driver-storage-mpath libvirt-daemon-driver-storage-rbd libvirt-daemon-driver-storage-scsi lightdm lightdm-gtk-greeter lightdm-gtk-greeter-branding-openSUSE
      lightdm-gtk-greeter-lang lightdm-gtk-greeter-settings lightdm-gtk-greeter-settings-lang lightdm-lang logrotate lynis mcelog net-snmp NetworkManager NetworkManager-applet
      NetworkManager-applet-lang NetworkManager-bluetooth NetworkManager-branding-openSUSE NetworkManager-lang NetworkManager-pppoe NetworkManager-tui NetworkManager-wwan nm-tray nm-tray-lang
      patterns-base-x11_enhanced perl-SNMP wpa_supplicant xdm xorg-x11 xorg-x11-essentials yast2-iscsi-client
    
    The following pattern is going to be REMOVED:
      x11_enhanced
    
    51 packages to remove.
    After the operation, 42.0 MiB will be freed.
    Continue? [y/n/v/...? shows all options] (y): n
    chris@asus-roc:~>$
    I looked at those package's requirements eg lightdm, and can't see why they need logrotate.

    Code:
    chris@asus-roc:~>$zypper if --requires lightdm
    Loading repository data...
    Reading installed packages...
    
    
    Information for package lightdm:
    --------------------------------
    Repository     : openSUSE-Tumbleweed-Oss
    Name           : lightdm
    Version        : 1.30.0-9.4
    Arch           : x86_64
    Vendor         : openSUSE
    Installed Size : 386.7 KiB
    Installed      : Yes
    Status         : up-to-date
    Source package : lightdm-1.30.0-9.4.src
    Upstream URL   : https://freedesktop.org/wiki/Software/LightDM
    Summary        : Lightweight, Cross-desktop Display Manager
    Description    : 
        LightDM is a lightweight, cross-desktop display manager. Its main
        features are a well-defined greeter API allowing multiple GUIs,
        support for all display manager use cases, with plugins where
        appropriate, low code complexity, and fast performance. Due to its
        cross-platform nature greeters can be written in several toolkits
        such as Qt and GTK+.
    Requires       : [16]
        libc.so.6(GLIBC_2.34)(64bit)
        libglib-2.0.so.0()(64bit)
        libgobject-2.0.so.0()(64bit)
        libgio-2.0.so.0()(64bit)
        libxcb.so.1()(64bit)
        libpam.so.0()(64bit)
        libpam.so.0(LIBPAM_1.0)(64bit)
        libgcrypt.so.20()(64bit)
        libgcrypt.so.20(GCRYPT_1.6)(64bit)
        libaudit.so.1()(64bit)
        xdm
        libXdmcp.so.6()(64bit)
        gdmflexiserver
        lightdm-greeter
        /bin/sh
        sysuser-shadow >= 3.1
    
    chris@asus-roc:~>$
    Can anyone explain why those 51 packages need to be deleted?

    Thanks.

  2. #2
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    16,049
    Blog Entries
    3

    Default Re: Zypper - removing packages

    Removing logrotate is a bad idea.

    If logs are recorded, they will eventually fill your disk. And "logrotate" is supposed to prevent that.

    I would guess that some of the programs require logrotate because they write logs.
    openSUSE Leap 15.4; KDE Plasma 5.24.4;
    testing Tumbleweed.

  3. #3
    Join Date
    Sep 2012
    Posts
    8,030

    Default Re: Zypper - removing packages

    Quote Originally Posted by kitman View Post
    I don;t need rsyslog/syslog/logrotate.
    Quite some packages do not use sysylog and write log files directly, so logrotate remains useful without syslog.
    eg lightdm, and can't see why they need logrotate.
    zypper transitively removes packages that require logrotate and then packages that require those packages etc. lightdm requires xdm which is being removed.
    Code:
    zypper search -i --requires-pkg logrotate
    and repeat for each package.

  4. #4

    Default Re: Zypper - removing packages

    Quote Originally Posted by nrickert View Post
    Removing logrotate is a bad idea.

    If logs are recorded, they will eventually fill your disk. And "logrotate" is supposed to prevent that.

    I would guess that some of the programs require logrotate because they write logs.
    I have systemd-journald running with a snippet to delete old logs. I was lead to understand that systemd-journald manages ALL logs now - yes/no?

    Code:
    chris@asus-roc:~>$cat /etc/systemd/journald.conf.d/10-delete_old.conf 
    [Journal]
    
    Storage=persistent
    MaxRetentionSec=3month

  5. #5

    Default Re: Zypper - removing packages

    Quote Originally Posted by arvidjaar View Post
    Quite some packages do not use sysylog and write log files directly, so logrotate remains useful without syslog.
    zypper transitively removes packages that require logrotate and then packages that require those packages etc. lightdm requires xdm which is being removed.
    Code:
    zypper search -i --requires-pkg logrotate
    and repeat for each package.
    Wel that's interesting -

    Code:
    chris@asus-roc:~>$zypper search -i --requires-pkg logrotate
    Loading repository data...
    Reading installed packages...
    
    S  | Name           | Summary                                             | Type
    ---+----------------+-----------------------------------------------------+--------
    i+ | iscsiuio       | Linux Broadcom NetXtremem II iscsi server           | package
    i+ | libvirt-daemon | Server side daemon and supporting files for libvirt | package
    i+ | lynis          | Security and System auditing tool                   | package
    i+ | mcelog         | Log Machine Check Events                            | package
    i+ | net-snmp       | SNMP Daemon                                         | package
    i+ | wpa_supplicant | WPA supplicant implementation                       | package
    i+ | xdm            | X Display Manager                                   | package
    
    
    
    chris@asus-roc:~>$zypper search -i --requires-pkg wpa_supplicant
    Loading repository data...
    Reading installed packages...
    
    S  | Name           | Summary                                           | Type
    ---+----------------+---------------------------------------------------+--------
    i+ | NetworkManager | Network Link Manager and user applications for it | package
    
    
    
    chris@asus-roc:~>$zypper search -i --requires-pkg xdm
    Loading repository data...
    Reading installed packages...
    
    S  | Name                  | Summary                                               | Type
    ---+-----------------------+-------------------------------------------------------+--------
    i+ | lightdm               | Lightweight, Cross-desktop Display Manager            | package
    i+ | xdm                   | X Display Manager                                     | package
    i+ | xorg-x11-essentials   | Compatibility metapackage for X.Org core applications | package
    i+ | xorg-x11-server       | X                                                     | package
    i+ | xorg-x11-server-extra | Additional Xservers Xephyr, Xnest)                    | package
    i+ | xorg-x11-server-Xvfb  | Virtual Xserver Xvfb                                  | package
    i+ | xorg-x11-Xvnc         | TigerVNC implementation of Xvnc                       | package
    chris@asus-roc:~>$
    If I stay focused on the lightdm package I can't find any logrotate.conf file that mentions it. But it seems lightdm.log file is just cycled each boot so why would logrotate need to manage that?

    Code:
    sus-roc:/var/log/lightdm # ls -al
    total 36
    drwxr-x--- 1 lightdm lightdm  164 Aug 14 07:59 .
    drwxr-xr-x 1 root    root    2940 Aug 14 07:59 ..
    -rw------- 1 root    root    3147 Aug 14 07:59 lightdm.log
    -rw------- 1 root    root    4401 Aug 14 07:58 lightdm.log.old
    -rw------- 1 root    root    7022 Jul 16 18:10 seat0-greeter.log
    -rw------- 1 root    root    5928 Jul  6 12:57 seat0-greeter.log.old
    -rw------- 1 root    root     876 Aug 14 07:59 x-0.log
    -rw------- 1 root    root     938 Aug 14 07:58 x-0.log.old
    I have more to investigate...

  6. #6
    Join Date
    Jan 2014
    Location
    Erlangen
    Posts
    4,170
    Blog Entries
    3

    Default Re: Zypper - removing packages

    Quote Originally Posted by nrickert View Post
    Removing logrotate is a bad idea.
    logrotate is an automatically installed package:
    Code:
    erlangen:~ # zypper info logrotate  
    Loading repository data... 
    Reading installed packages... 
    
    
    Information for package logrotate: 
    ---------------------------------- 
    Repository     : openSUSE-Tumbleweed-Oss 
    Name           : logrotate 
    Version        : 3.20.1-2.1 
    Arch           : x86_64 
    Vendor         : openSUSE 
    Installed Size : 160.8 KiB 
    Installed      : Yes (automatically) 
    Status         : up-to-date 
    Source package : logrotate-3.20.1-2.1.src 
    Upstream URL   : https://github.com/logrotate/logrotate 
    Summary        : Cron service for rotating, compressing, mailing and removing system log files 
    Description    :  
        The logrotate utility does automatic rotation, compression, mailing and removal 
        of log files. Logrotate can be set to handle a log file daily, weekly, monthly, 
        or when the log file reaches a certain size. Normally, logrotate runs as a 
        daily cron job. 
    
        It manages plain files only and is not involved in systemd's journal rotation. 
    
    erlangen:~ #
    Cleaning up an installation should never start at the bottom, but at the top. Check the list of packages flagged as user installed and consider their removal including ramifications.

    I made a complete switch from PackageKit to zypper dist-upgrade and removed related packages:
    Code:
    erlangen:~ # zypper se packagekit 
    Loading repository data... 
    Reading installed packages... 
    
    S | Name                             | Summary                                                                            | Type 
    --+----------------------------------+------------------------------------------------------------------------------------+-------- 
      | cockpit-packagekit               | Cockpit user interface for packages                                                | package 
      | discover-backend-packagekit      | PackageKit Backend for Discover                                                    | package 
      | gnome-packagekit                 | Applications for the PackageKit API                                                | package 
      | gnome-packagekit-extras          | Extra applications for the PackageKit API                                          | package 
      | gnome-packagekit-lang            | Translations for package gnome-packagekit                                          | package 
      | libpackagekit-glib2-18           | GLib integration of PackageKit                                                     | package 
      | libpackagekit-glib2-18-32bit     | GLib integration of PackageKit                                                     | package 
      | libpackagekit-glib2-devel        | GLib integration of PackageKit                                                     | package 
      | libpackagekit-glib2-devel-32bit  | GLib integration of PackageKit                                                     | package 
    i | libpackagekitqt5-1               | Simple software installation management software                                   | package 
      | libpackagekitqt6-1               | Simple software installation management software                                   | package 
      | microos_base_packagekit          | openSUSE MicroOS using PackageKit                                                  | pattern 
      | PackageKit                       | Simple software installation management software                                   | package 
      | PackageKit-backend-dnf           | DNF backend for the PackageKit installation management software                    | package 
      | PackageKit-backend-zypp          | Zypp backend for the PackageKit installation management software                   | package 
      | PackageKit-branding-openSUSE     | Simple software installation management software -- openSUSE default configuration | package 
      | PackageKit-branding-upstream     | Upstream configuration for the PackageKit installation management software         | package 
      | PackageKit-devel                 | Header files for development with PackageKit                                       | package 
      | PackageKit-gstreamer-plugin      | Install GStreamer codecs using PackageKit                                          | package 
      | PackageKit-gtk3-module           | Install fonts automatically using PackageKit                                       | package 
      | PackageKit-lang                  | Translations for package PackageKit                                                | package 
      | packagekitqt5-devel              | Simple software installation management software                                   | package 
      | packagekitqt6-devel              | Simple software installation management software                                   | package 
      | patterns-microos-base-packagekit | openSUSE MicroOS using PackageKit                                                  | package 
      | typelib-1_0-PackageKitGlib-1_0   | Introspection bindings for PackageKit's GLib integration                           | package 
    erlangen:~ #
    Removing the remaining libpackagekitqt5-1 would result in:
    Code:
    erlangen:~ # zypper remove --clean-deps --dry-run libpackagekitqt5-1               
    Reading installed packages... 
    Resolving package dependencies... 
    
    The following 21 packages are going to be REMOVED:
      frameworkintegration-plugin kdenetwork-filesharing kdenetwork-filesharing-lang libpackagekitqt5-1 patterns-kde-kde patterns-kde-kde_plasma plasma5-addons plasma5-addons-lang plasma5-defaults-openSUSE plasma5-desktop plasma5-desktop-emojier plasma5-desktop-lang plasma5-session plasma5-session-wayland plasma5-theme-openSUSE plasma5-workspace plasma5-workspace-branding-openSUSE plasma5-workspace-lang sddm sddm-branding-openSUSE sddm-theme-openSUSE 
    
    The following 2 patterns are going to be REMOVED:
      kde kde_plasma 
    
    21 packages to remove. 
    After the operation, 81.0 MiB will be freed. 
    Continue? [y/n/v/...? shows all options] (y): 
    erlangen:~ #
    Updates and upgrades will cause re-installation unless solver defaults are configured properly:
    Code:
    erlangen:~ # grep ^solver /etc/zypp/zypp.conf           
    solver.onlyRequires = false 
    erlangen:~ #
    
    Defaults may still be overridden on the command line if desirable. More cleanup: https://forums.opensuse.org/showthre...ution-upgrades
    i7-6700K (2016), i5-8250U (2018), AMD Ryzen 5 3400G (2020), 5600X, 5700U (2022) openSUSE Tumbleweed, KDE Plasma

  7. #7
    Join Date
    Sep 2012
    Posts
    8,030

    Default Re: Zypper - removing packages

    Quote Originally Posted by kitman View Post
    I was lead to understand that systemd-journald manages ALL logs now - yes/no?
    No. systemd-journald manages logs sent to journal and logs sent to syslog. It is not ware of and cannot manage log files written by applications directly.
    Quote Originally Posted by kitman View Post
    But it seems lightdm.log file is just cycled each boot so why would logrotate need to manage that?
    lightdm package does not require logrotate package.

  8. #8

    Default Re: Zypper - removing packages

    Quote Originally Posted by arvidjaar View Post
    No. systemd-journald manages logs sent to journal and logs sent to syslog. It is not ware of and cannot manage log files written by applications directly.

    lightdm package does not require logrotate package.
    Maybe it was my clumsy way of saying things. Systemd-journald can run without rsyslog is the bottom line - no point having two systems do the same job on my desktops. And while it can't initially manage application logs, rsyslog can with some setting up. But why create a headache

    In tumbleweed lightdm does require logrotate so I'm leaving that installed but disabled. Funny thing, in my Arch linux laptop I can remove logrotate without issue and lightdm and other packages don't complain.

    I found this a good reference https://access.redhat.com/documentat...ging_log_files

  9. #9
    Join Date
    Jan 2014
    Location
    Erlangen
    Posts
    4,170
    Blog Entries
    3

    Default Re: Zypper - removing packages

    Quote Originally Posted by kitman View Post
    In tumbleweed lightdm does require logrotate so I'm leaving that installed but disabled. Funny thing, in my Arch linux laptop I can remove logrotate without issue and lightdm and other packages don't complain
    Are you sure?
    Code:
    erlangen:~ # rpm -q --whatrequires logrotate 
    xdm-1.1.13-2.1.x86_64 
    wpa_supplicant-2.10-3.1.x86_64 
    vsftpd-3.0.5-5.1.x86_64 
    mcelog-181-1.3.x86_64 
    net-snmp-5.9.2-2.1.x86_64 
    munge-0.5.15-1.1.x86_64 
    iscsiuio-0.7.8.6-92.1.x86_64 
    fetchmail-6.4.32-1.1.x86_64 
    apache2-2.4.54-2.1.x86_64 
    slurm-config-22.05.2-3.1.noarch 
    erlangen:~ # rpm -q --requires lightdm 
    /bin/sh 
    /bin/sh 
    /bin/sh 
    /bin/sh 
    /bin/sh 
    config(lightdm) = 1.30.0-9.4 
    gdmflexiserver 
    libXdmcp.so.6()(64bit) 
    libaudit.so.1()(64bit) 
    libc.so.6()(64bit) 
    libc.so.6(GLIBC_2.14)(64bit) 
    libc.so.6(GLIBC_2.2.5)(64bit) 
    libc.so.6(GLIBC_2.3.4)(64bit) 
    libc.so.6(GLIBC_2.34)(64bit) 
    libc.so.6(GLIBC_2.4)(64bit) 
    libgcrypt.so.20()(64bit) 
    libgcrypt.so.20(GCRYPT_1.6)(64bit) 
    libgio-2.0.so.0()(64bit) 
    libglib-2.0.so.0()(64bit) 
    libgobject-2.0.so.0()(64bit) 
    libpam.so.0()(64bit) 
    libpam.so.0(LIBPAM_1.0)(64bit) 
    libxcb.so.1()(64bit) 
    lightdm-greeter 
    rpmlib(CompressedFileNames) <= 3.0.4-1 
    rpmlib(FileDigests) <= 4.6.0-1 
    rpmlib(PayloadFilesHavePrefix) <= 4.0-1 
    rpmlib(PayloadIsZstd) <= 5.4.18-1 
    sysuser-shadow >= 3.1 
    xdm 
    erlangen:~ #
    i7-6700K (2016), i5-8250U (2018), AMD Ryzen 5 3400G (2020), 5600X, 5700U (2022) openSUSE Tumbleweed, KDE Plasma

  10. #10

    Default Re: Zypper - removing packages

    Quote Originally Posted by karlmistelberger View Post
    Are you sure?
    Yes. It was through deleting xdm package that lightdm would have got deleted.

    Code:
    asus-roc:~ # rpm -q --whatrequires xdm
    xorg-x11-essentials-7.6_1-16.16.noarch
    lightdm-1.30.0-9.4.x86_64
    asus-roc:~ #

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •