Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: Can't remove packages with zypper

  1. #1

    Default Can't remove packages with zypper

    Can't remove this packages

    > zypper search -i | grep kube
    S | Name | Summary | Type
    ---+----------------------+------------------------------------------------+--------
    i+ | kubernetes-apiserver | Kubernetes apiserver for container image | package
    i+ | kubernetes-client | Kubernetes client tools | package
    i+ | kubernetes-coredns | Kubernetes coredns daemon for container images | package
    i+ | kubernetes-etcd | Kubernetes etcd daemon for container images | package
    i+ | kubernetes-kubeadm | Kubernetes kubeadm bootstrapping tool | package
    i+ | kubernetes-kubelet | Kubernetes kubelet daemon | package
    i+ | kubernetes-proxy | Kubernetes proxy for container image | package

    They reference other packages, when I do a verify it tries to install missing dependincies.

    > zypper verify
    Loading repository data...
    Reading installed packages...


    The following 9 NEW packages are going to be installed:
    cri-o-kubeadm-criconfig kubernetes1.22-kubelet kubernetes1.23-apiserver kubernetes1.23-client kubernetes1.23-client-common kubernetes1.23-kubeadm kubernetes1.23-kubelet kubernetes1.23-kubelet-common kubernetes1.23-proxy

    and it succeeds. the problem is that if I try to remove them I get this

    > zypper remove $(zypper search -i | grep kube | awk -F'|' '{print $2}')
    Reading installed packages...
    Resolving package dependencies...


    The following 7 packages are going to be REMOVED:
    kubernetes-apiserver kubernetes-client kubernetes-coredns kubernetes-etcd kubernetes-kubeadm kubernetes-kubelet kubernetes-proxy


    7 packages to remove.
    After the operation, 574.0 B will be freed.
    Continue? [y/n/v/...? shows all options] (y): y
    error: package kubernetes-apiserver-1.23.0-22.3.x86_64 is not installed
    (1/7) Removing kubernetes-apiserver-1.23.0-22.3.x86_64 ................................................................................................................................................................................................[error]
    Removal of (215)kubernetes-apiserver-1.23.0-22.3.x86_64(@System) failed:
    Error: Subprocess failed. Error: RPM failed: Command exited with status 1.

    I tried with rpm but no packages are actually installed

    > rpm -qa | grep kube
    >

    How do I remove those?

  2. #2
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    30,955

    Default Re: Can't remove packages with zypper

    Just a "you never know if it helps":

    Code:
    zypper clean
    zypper ref
    Henk van Velden

  3. #3
    Join Date
    Sep 2012
    Posts
    7,868

    Default Re: Can't remove packages with zypper

    Show output of
    Code:
    ls -l /var/lib/rpm
    ls -l /usr/lib/sysimage/rpm

  4. #4

    Default Re: Can't remove packages with zypper

    Quote Originally Posted by hcvv View Post
    Just a "you never know if it helps":

    Code:
    zypper clean
    zypper ref
    That didn't help

  5. #5

    Default Re: Can't remove packages with zypper

    Quote Originally Posted by arvidjaar View Post
    Show output of
    Code:
    ls -l /var/lib/rpm
    ls -l /usr/lib/sysimage/rpm
    > ls -l /var/lib/rpm
    lrwxrwxrwx 1 root root 26 Mar 11 22:10 /var/lib/rpm -> ../../usr/lib/sysimage/rpm
    > ls -l /usr/lib/sysimage/rpm
    total 87236
    -rw-r--r-- 1 root root 0 Mar 11 22:03 .rpm.lock
    -rw-r--r-- 1 root root 19619840 Mar 14 17:54 Index.db
    -rw-r--r-- 1 root root 69709184 Mar 14 17:54 Packages.db

  6. #6
    Join Date
    Sep 2012
    Posts
    7,868

    Default Re: Can't remove packages with zypper

    Quote Originally Posted by lmva View Post
    > zypper search -i | grep kube
    S | Name | Summary | Type
    ---+----------------------+------------------------------------------------+--------
    i+ | kubernetes-apiserver | Kubernetes apiserver for container image | package
    i+ | kubernetes-client | Kubernetes client tools | package
    i+ | kubernetes-coredns | Kubernetes coredns daemon for container images | package
    i+ | kubernetes-etcd | Kubernetes etcd daemon for container images | package
    i+ | kubernetes-kubeadm | Kubernetes kubeadm bootstrapping tool | package
    i+ | kubernetes-kubelet | Kubernetes kubelet daemon | package
    i+ | kubernetes-proxy | Kubernetes proxy for container image | package
    Always use tags [code]...[/code] around computer text.

    How did you manage to get this state? All listed packages are virtual; they do not install any files and only contain requirement for versioned kubernetes packages (like kerbernetes1.23-apiserver). You simply cannot install kubernetes-apiserver alone (well, you can, but you must try hard and it is impossible to do by accident).

    > zypper verify
    Loading repository data...
    Reading installed packages...


    The following 9 NEW packages are going to be installed:
    cri-o-kubeadm-criconfig kubernetes1.22-kubelet kubernetes1.23-apiserver kubernetes1.23-client kubernetes1.23-client-common kubernetes1.23-kubeadm kubernetes1.23-kubelet kubernetes1.23-kubelet-common kubernetes1.23-proxy

    and it succeeds.
    Really? How do you know it? We have no way to tell whether it succeed or not without seeing actual output, but according to
    > zypper remove $(zypper search -i | grep kube | awk -F'|' '{print $2}')
    Reading installed packages...
    Resolving package dependencies...


    The following 7 packages are going to be REMOVED:
    You still have the same 7 packages, not 16 as expected, so nothing have been installed.

    Something was wrong at the very beginning.

    Start with showing
    Code:
    rpm -qa kube\*
    zypper se -si '/^kube/'
    Always show full command invocation and its output including subsequent prompt so we know output is complete. Do not type, copy and paste.

  7. #7
    Join Date
    Sep 2012
    Posts
    7,868

    Default Re: Can't remove packages with zypper

    Quote Originally Posted by hcvv View Post
    Code:
    zypper clean
    It simply deletes downloaded packages from cache. It hardly can affect what packages zypper believes are nistalled.

  8. #8
    Join Date
    Jan 2014
    Location
    Erlangen
    Posts
    4,010

    Default Re: Can't remove packages with zypper

    Quote Originally Posted by lmva View Post
    That didn't help
    Try zypper clean --all.
    i7-6700K (2016), i5-8250U (2018), AMD Ryzen 5 3400G (2020), 5600X (2022) openSUSE Tumbleweed, KDE Plasma

  9. #9

    Default Re: Can't remove packages with zypper

    Quote Originally Posted by arvidjaar View Post
    Always use tags [code]...[/code] around computer text.

    How did you manage to get this state? All listed packages are virtual; they do not install any files and only contain requirement for versioned kubernetes packages (like kerbernetes1.23-apiserver). You simply cannot install kubernetes-apiserver alone (well, you can, but you must try hard and it is impossible to do by accident).


    Really? How do you know it? We have no way to tell whether it succeed or not without seeing actual output, but according to

    You still have the same 7 packages, not 16 as expected, so nothing have been installed.

    Something was wrong at the very beginning.

    Start with showing
    Code:
    rpm -qa kube\*
    zypper se -si '/^kube/'
    Always show full command invocation and its output including subsequent prompt so we know output is complete. Do not type, copy and paste.
    Code:
     root  ~  zypper se -si '/^kube/'
    Loading repository data...
    Reading installed packages...
    
    
    S  | Name                 | Type    | Version     | Arch   | Repository
    ---+----------------------+---------+-------------+--------+----------------------
    i+ | kubernetes-apiserver | package | 1.23.0-22.3 | x86_64 | Main Repository (OSS)
    i+ | kubernetes-apiserver | package | 1.23.0-22.3 | x86_64 | openSUSE-20220310-0
    i+ | kubernetes-client    | package | 1.23.0-22.3 | x86_64 | Main Repository (OSS)
    i+ | kubernetes-client    | package | 1.23.0-22.3 | x86_64 | openSUSE-20220310-0
    i+ | kubernetes-coredns   | package | 1.8.6-22.3  | x86_64 | Main Repository (OSS)
    i+ | kubernetes-coredns   | package | 1.8.6-22.3  | x86_64 | openSUSE-20220310-0
    i+ | kubernetes-etcd      | package | 3.5.1-22.3  | x86_64 | Main Repository (OSS)
    i+ | kubernetes-etcd      | package | 3.5.1-22.3  | x86_64 | openSUSE-20220310-0
    i+ | kubernetes-kubeadm   | package | 1.23.0-22.3 | x86_64 | Main Repository (OSS)
    i+ | kubernetes-kubeadm   | package | 1.23.0-22.3 | x86_64 | openSUSE-20220310-0
    i+ | kubernetes-kubelet   | package | 1.23.0-22.3 | x86_64 | Main Repository (OSS)
    i+ | kubernetes-kubelet   | package | 1.23.0-22.3 | x86_64 | openSUSE-20220310-0
    i+ | kubernetes-proxy     | package | 1.23.0-22.3 | x86_64 | Main Repository (OSS)
    i+ | kubernetes-proxy     | package | 1.23.0-22.3 | x86_64 | openSUSE-20220310-0
    [/noparse]

  10. #10

    Default Re: Can't remove packages with zypper

    As I didn't paste the other command with full out put and did it without code tags (sorry just new around here ) here it goes

    When I do verify
    Code:
     root  ~  zypper verify
    Retrieving repository 'Main Repository (NON-OSS)' metadata .............................................................................................................................................................................................[done]
    Building repository 'Main Repository (NON-OSS)' cache ..................................................................................................................................................................................................[done]
    Retrieving repository 'Main Repository (OSS)' metadata .................................................................................................................................................................................................[done]
    Building repository 'Main Repository (OSS)' cache ......................................................................................................................................................................................................[done]
    Retrieving repository 'openSUSE-20220310-0' metadata ...................................................................................................................................................................................................[done]
    Building repository 'openSUSE-20220310-0' cache ........................................................................................................................................................................................................[done]
    Loading repository data...
    Reading installed packages...
    
    
    The following 9 NEW packages are going to be installed:
      cri-o-kubeadm-criconfig kubernetes1.22-kubelet kubernetes1.23-apiserver kubernetes1.23-client kubernetes1.23-client-common kubernetes1.23-kubeadm kubernetes1.23-kubelet kubernetes1.23-kubelet-common kubernetes1.23-proxy
    
    
    9 new packages to install.
    Overall download size: 106.0 MiB. Already cached: 0 B. After the operation, additional 624.0 MiB will be used.
    Some of the dependencies of installed packages are broken. In order to fix these dependencies, the following actions need to be taken:
    Continue? [y/n/v/...? shows all options] (y): y
    Retrieving package kubernetes1.23-apiserver-1.23.0-3.2.x86_64                                                                                                                                                            (1/9),  25.9 MiB (161.5 MiB unpacked)
    Retrieving: kubernetes1.23-apiserver-1.23.0-3.2.x86_64.rpm .................................................................................................................................................................................[done (9.6 MiB/s)]
    Retrieving package kubernetes1.23-client-1.23.0-3.2.x86_64                                                                                                                                                               (2/9),  10.7 MiB ( 55.2 MiB unpacked)
    Retrieving: kubernetes1.23-client-1.23.0-3.2.x86_64.rpm ....................................................................................................................................................................................[done (8.9 MiB/s)]
    Retrieving package kubernetes1.23-kubelet-1.23.0-3.2.x86_64                                                                                                                                                              (3/9),  24.7 MiB (154.2 MiB unpacked)
    Retrieving: kubernetes1.23-kubelet-1.23.0-3.2.x86_64.rpm ...................................................................................................................................................................................[done (9.1 MiB/s)]
    Retrieving package kubernetes1.23-proxy-1.23.0-3.2.x86_64                                                                                                                                                                (4/9),   9.9 MiB ( 53.0 MiB unpacked)
    Retrieving: kubernetes1.23-proxy-1.23.0-3.2.x86_64.rpm .....................................................................................................................................................................................[done (5.9 MiB/s)]
    Retrieving package kubernetes1.23-client-common-1.23.0-3.2.x86_64                                                                                                                                                        (5/9), 242.4 KiB (627.6 KiB unpacked)
    Retrieving: kubernetes1.23-client-common-1.23.0-3.2.x86_64.rpm .........................................................................................................................................................................................[done]
    Retrieving package kubernetes1.23-kubelet-common-1.23.0-3.2.x86_64                                                                                                                                                       (6/9),  56.9 KiB (147.3 KiB unpacked)
    Retrieving: kubernetes1.23-kubelet-common-1.23.0-3.2.x86_64.rpm ........................................................................................................................................................................................[done]
    Retrieving package kubernetes1.22-kubelet-1.22.4-2.4.x86_64                                                                                                                                                              (7/9),  23.7 MiB (145.0 MiB unpacked)
    Retrieving: kubernetes1.22-kubelet-1.22.4-2.4.x86_64.rpm ...................................................................................................................................................................................[done (6.5 MiB/s)]
    Retrieving package kubernetes1.23-kubeadm-1.23.0-3.2.x86_64                                                                                                                                                              (8/9),  10.6 MiB ( 54.3 MiB unpacked)
    Retrieving: kubernetes1.23-kubeadm-1.23.0-3.2.x86_64.rpm ...................................................................................................................................................................................[done (9.2 MiB/s)]
    Retrieving package cri-o-kubeadm-criconfig-1.22.0-1.5.x86_64                                                                                                                                                             (9/9),  78.0 KiB (  167   B unpacked)
    Retrieving: cri-o-kubeadm-criconfig-1.22.0-1.5.x86_64.rpm ..............................................................................................................................................................................................[done]
    
    
    Checking for file conflicts: ...........................................................................................................................................................................................................................[done]
    (1/9) Installing: kubernetes1.23-apiserver-1.23.0-3.2.x86_64 ...........................................................................................................................................................................................[done]
    (2/9) Installing: kubernetes1.23-client-1.23.0-3.2.x86_64 ..............................................................................................................................................................................................[done]
    (3/9) Installing: kubernetes1.23-kubelet-1.23.0-3.2.x86_64 .............................................................................................................................................................................................[done]
    (4/9) Installing: kubernetes1.23-proxy-1.23.0-3.2.x86_64 ...............................................................................................................................................................................................[done]
    update-alternatives: using /usr/bin/kubectl1.23 to provide /usr/bin/kubectl (kubectl) in auto mode
    (5/9) Installing: kubernetes1.23-client-common-1.23.0-3.2.x86_64 .......................................................................................................................................................................................[done]
    Updating /etc/sysconfig/kubelet ...
    (6/9) Installing: kubernetes1.23-kubelet-common-1.23.0-3.2.x86_64 ......................................................................................................................................................................................[done]
    (7/9) Installing: kubernetes1.22-kubelet-1.22.4-2.4.x86_64 .............................................................................................................................................................................................[done]
    (8/9) Installing: kubernetes1.23-kubeadm-1.23.0-3.2.x86_64 .............................................................................................................................................................................................[done]
    Updating /etc/sysconfig/kubelet ...
    (9/9) Installing: cri-o-kubeadm-criconfig-1.22.0-1.5.x86_64 ............................................................................................................................................................................................[done]
    [/noparse]

    Code:
     root  ~  zypper se -si '/^kube/'
    Loading repository data...
    Reading installed packages...
    
    
    S  | Name                          | Type    | Version     | Arch   | Repository
    ---+-------------------------------+---------+-------------+--------+----------------------
    i+ | kubernetes-apiserver          | package | 1.23.0-22.3 | x86_64 | Main Repository (OSS)
    i+ | kubernetes-apiserver          | package | 1.23.0-22.3 | x86_64 | openSUSE-20220310-0
    i+ | kubernetes-client             | package | 1.23.0-22.3 | x86_64 | Main Repository (OSS)
    i+ | kubernetes-client             | package | 1.23.0-22.3 | x86_64 | openSUSE-20220310-0
    i+ | kubernetes-coredns            | package | 1.8.6-22.3  | x86_64 | Main Repository (OSS)
    i+ | kubernetes-coredns            | package | 1.8.6-22.3  | x86_64 | openSUSE-20220310-0
    i+ | kubernetes-etcd               | package | 3.5.1-22.3  | x86_64 | Main Repository (OSS)
    i+ | kubernetes-etcd               | package | 3.5.1-22.3  | x86_64 | openSUSE-20220310-0
    i+ | kubernetes-kubeadm            | package | 1.23.0-22.3 | x86_64 | Main Repository (OSS)
    i+ | kubernetes-kubeadm            | package | 1.23.0-22.3 | x86_64 | openSUSE-20220310-0
    i+ | kubernetes-kubelet            | package | 1.23.0-22.3 | x86_64 | Main Repository (OSS)
    i+ | kubernetes-kubelet            | package | 1.23.0-22.3 | x86_64 | openSUSE-20220310-0
    i+ | kubernetes-proxy              | package | 1.23.0-22.3 | x86_64 | Main Repository (OSS)
    i+ | kubernetes-proxy              | package | 1.23.0-22.3 | x86_64 | openSUSE-20220310-0
    i  | kubernetes1.22-kubelet        | package | 1.22.4-2.4  | x86_64 | Main Repository (OSS)
    i  | kubernetes1.22-kubelet        | package | 1.22.4-2.4  | x86_64 | openSUSE-20220310-0
    i  | kubernetes1.23-apiserver      | package | 1.23.0-3.2  | x86_64 | Main Repository (OSS)
    i  | kubernetes1.23-apiserver      | package | 1.23.0-3.2  | x86_64 | openSUSE-20220310-0
    i  | kubernetes1.23-client         | package | 1.23.0-3.2  | x86_64 | Main Repository (OSS)
    i  | kubernetes1.23-client         | package | 1.23.0-3.2  | x86_64 | openSUSE-20220310-0
    i  | kubernetes1.23-client-common  | package | 1.23.0-3.2  | x86_64 | Main Repository (OSS)
    i  | kubernetes1.23-client-common  | package | 1.23.0-3.2  | x86_64 | openSUSE-20220310-0
    i  | kubernetes1.23-kubeadm        | package | 1.23.0-3.2  | x86_64 | Main Repository (OSS)
    i  | kubernetes1.23-kubeadm        | package | 1.23.0-3.2  | x86_64 | openSUSE-20220310-0
    i  | kubernetes1.23-kubelet        | package | 1.23.0-3.2  | x86_64 | Main Repository (OSS)
    i  | kubernetes1.23-kubelet        | package | 1.23.0-3.2  | x86_64 | openSUSE-20220310-0
    i  | kubernetes1.23-kubelet-common | package | 1.23.0-3.2  | x86_64 | Main Repository (OSS)
    i  | kubernetes1.23-kubelet-common | package | 1.23.0-3.2  | x86_64 | openSUSE-20220310-0
    i  | kubernetes1.23-proxy          | package | 1.23.0-3.2  | x86_64 | Main Repository (OSS)
    i  | kubernetes1.23-proxy          | package | 1.23.0-3.2  | x86_64 | openSUSE-20220310-0
    [/noparse]

Page 1 of 2 12 LastLast

Tags for this Thread

Posting Permissions

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