Undoing/removing pacman vendor change and removing pacman packages

Hi

I added the pacman essential repo, but only some of the packages from it so I could troubleshoot some playback issues I was having on youtube, I no longer have playback issues.
Could someone tell me how to undo the pacman vendor change, and also tell me how to properly remove the pacman packages+dependencies I installed. Below is a summary of my commands

zypper ar -cfp 90 https://ftp.gwdg.de/pub/linux/misc/packman/suse/openSUSE_Leap_15.2/Essentials](https://ftp.gwdg.de/pub/linux/misc/packman/suse/openSUSE_Leap_15.2/Essentials) packman-essentials
sudo zypper install --from packman-essentials --force libavcodec56 libavcodec57 libavcodec58 libavformat56 libavformat57 libavformat58 libavdevice56 libavdevice57
The following 14 NEW packages are going to be installed: libavdevice57 libavdevice58 libavfilter7 libavresample4 libbs2b0 libpostproc55 librtmp1 libSDL2-2_0-0 libswscale5 libvidstab1_1 libvo-amrwbenc0 libx264-160 libx265-192 libxvidcore4

The following 12 packages are going to be upgraded:
 libavcodec57 libavcodec58 libavfilter6 libavformat57 libavformat58 libavresample3 libavutil55 libavutil56 libpostproc54 libswresample2 libswresample3 libswscale4

The following 12 packages are going to change vendor:
 libavcodec57    openSUSE -> http://packman.links2linux.de
 libavcodec58    openSUSE -> http://packman.links2linux.de
 libavfilter6    openSUSE -> http://packman.links2linux.de
 libavformat57   openSUSE -> http://packman.links2linux.de
 libavformat58   openSUSE -> http://packman.links2linux.de
 libavresample3  openSUSE -> http://packman.links2linux.de
 libavutil55     openSUSE -> http://packman.links2linux.de
 libavutil56     openSUSE -> http://packman.links2linux.de
 libpostproc54   openSUSE -> http://packman.links2linux.de
 libswresample2  openSUSE -> http://packman.links2linux.de
 libswresample3  openSUSE -> http://packman.links2linux.de
 libswscale4     openSUSE -> http://packman.links2linux.de


12 packages to upgrade, 14 new, 12  to change vendor.

I presume you won’t delete all packages from repo packman-essentials, but only the unneeded ones. Try:

3400G:~ # zypper search -is --repo packman |grep ^i+
i+ | ffmpeg-4                   | package | 4.3.1-8.3                      | x86_64 | packman
i+ | handbrake-gtk              | package | 1.3.3-3.10                     | x86_64 | packman
i+ | obs-studio                 | package | 26.0.2-3.2                     | x86_64 | packman
i+ | vlc                        | package | 3.0.11.1-6.1                   | x86_64 | packman
i+ | vlc-codecs                 | package | 3.0.11.1-6.1                   | x86_64 | packman
i+ | youtube-dl                 | package | 2020.11.12-1.1                 | noarch | packman
3400G:~ # 

Delete packages from the list running:

3400G:~ # zypper remove --dry-run --clean-deps vlc
Reading installed packages...
Resolving package dependencies...

The following 8 packages are going to be REMOVED:
  libaa1 libcaca0 libchromaprint1 libprojectM3 libva-wayland2 vlc vlc-qt vlc-vdpau

8 packages to remove.
After the operation, 8.1 MiB will be freed.
Continue? [y/n/v/...? shows all options] (y): 
3400G:~ # 

no I want to remove(dleete) all the packages installed from packman-essentials, I dont need them at all in this PC, I want this PC to be back to the same approved SUSE packages prior to installing pakman-essentials

You could try:

(1) disable or remove the packman repo;

(2) use

zypper dup --allow-vendor-change

which should switch everything back to the main repos;

(3) use

zypper packages --orphaned

to list any remaining packages from packman, which you could then delete as desired.

You may get some conflicts. And you could do a “–dry-run” with the “zypper dup” to just inspect what will happen.

1 Like

perfect, thanks [FONT=arial]nrickert. Did steps 1-3, for deleting any reaming orphaned packages from step 3 I used command
[/FONT]

zypper rm --clean-deps libx264-160
Reading installed packages...
Resolving package dependencies...

The following package is going to be REMOVED:
  libx264-160

1 package to remove.
After the operation, 1.7 MiB will be freed.
**Continue? [y/n/v/...? shows all options] (y): **y
(1/1) Removing libx264-160-0.160+git20200702.cde9a933-pm152.1.2.x86_64 .................................................................................................................................................[done]

[FONT=arial]hopefully this is how to remove the orphaned packages[/FONT]

**erlangen:~ #** zypper dup --dry-run --from openSUSE-Tumbleweed-Oss 
Loading repository data... 
Reading installed packages... 
Computing distribution upgrade... 

The following 26 packages are going to be downgraded:
  conky ffmpeg-4 libavcodec58_91 libavdevice58_10 libavfilter7_85 libavformat58_45 libavresample4_0 libavutil56_51 libgstphotography-1_0-0 libheif1 libpostproc55_7 libquicktime0 libsox3 libswresample3_7 libswscale5_7 libvlc5 libvlccore9 sox vlc vlc-codec-gstreamer vlc-lang vlc-noX vlc-qt 
  vlc-vdpau youtube-dl youtube-dl-bash-completion 

The following 26 packages are going to change vendor:
  conky                       http://packman.links2linux.de -> openSUSE 
  ffmpeg-4                    http://packman.links2linux.de -> openSUSE 
  libavcodec58_91             http://packman.links2linux.de -> openSUSE 
  libavdevice58_10            http://packman.links2linux.de -> openSUSE 
  libavfilter7_85             http://packman.links2linux.de -> openSUSE 
  libavformat58_45            http://packman.links2linux.de -> openSUSE 
  libavresample4_0            http://packman.links2linux.de -> openSUSE 
  libavutil56_51              http://packman.links2linux.de -> openSUSE 
  libgstphotography-1_0-0     http://packman.links2linux.de -> openSUSE 
  libheif1                    http://packman.links2linux.de -> openSUSE 
  libpostproc55_7             http://packman.links2linux.de -> openSUSE 
  libquicktime0               http://packman.links2linux.de -> openSUSE 
  libsox3                     http://packman.links2linux.de -> openSUSE 
  libswresample3_7            http://packman.links2linux.de -> openSUSE 
  libswscale5_7               http://packman.links2linux.de -> openSUSE 
  libvlc5                     http://packman.links2linux.de -> openSUSE 
  libvlccore9                 http://packman.links2linux.de -> openSUSE 
  sox                         http://packman.links2linux.de -> openSUSE 
  vlc                         http://packman.links2linux.de -> openSUSE 
  vlc-codec-gstreamer         http://packman.links2linux.de -> openSUSE 
  vlc-lang                    http://packman.links2linux.de -> openSUSE 
  vlc-noX                     http://packman.links2linux.de -> openSUSE 
  vlc-qt                      http://packman.links2linux.de -> openSUSE 
  vlc-vdpau                   http://packman.links2linux.de -> openSUSE 
  youtube-dl                  http://packman.links2linux.de -> openSUSE 
  youtube-dl-bash-completion  http://packman.links2linux.de -> openSUSE 

26 packages to downgrade, 26  to change vendor. 
Overall download size: 21.3 MiB. Already cached: 0 B. After the operation, 6.8 MiB will be freed. 
**Continue? [y/n/v/...? shows all options] (y): **

Checking for file conflicts: (26 skipped) .....................................................................................................................................................................................................................................................[done] 
Warning: 26 packages had to be excluded from file conflicts check because they are not yet downloaded. 

    Note: Checking for file conflicts requires not installed packages to be downloaded in advance in 
    order to access their file lists. See option '--download-in-advance / --dry-run --download-only' 
    in the zypper manual page for details. 

**erlangen:~ #**

Very good, I was wondering if someone noticed what I thought was missing in earlier posts…
When you “zypper dup” that’s not sufficient unless you undo the command that set the packman repository in the beginning… You also have to add "–from repository_id " where the repository id is some identifier related to the OSS repository(can be anything that uniquely identifies the repository) and in the provided example I’ve highlighted in** lime green** .

Note that it’s standard package management that it’s not guaranteed uninstalling packages will return your system to the status before the packages were installed… sometimes files will be left behind which if you really need to remove would have to be removed manually.
The alternative method to guarantee a return your system to previous status with absolutely no crud left behind is to use snapper and BTRFS snapshots to roll back to a date and time before you added those packages (and other changes will be rolled back as well).

TSU

Hello,

The solution provided by @nrickert is the right one.
I want only to add that: when you have “regular” openSUSE repos and “another” repo, to revert all the packages to “regular” repo you have to disable (remove) “another” repo and a simply “zypper dup” is enough. It will revert all the packages to “regular” repo. You do not need “zypper dup --allow-vendor-change” or “zypper dup --from regular_repo”.

Below is the output from following @nrickert. First step I did was disable the pacman repo through yast, then

zypper dup --allow-vendor-change
Loading repository data...
Reading installed packages...
Warning: You are about to do a distribution upgrade with all enabled repositories. Make sure these repositories are compatible before you continue. See 'man zypper' for more information about this command.
Computing distribution upgrade...

The following 8 packages are going to be upgraded:
 grub2 grub2-i386-pc grub2-snapper-plugin grub2-systemd-sleep-plugin grub2-x86_64-efi openssh openssh-askpass-gnome openssh-helpers

The following 18 packages are going to be downgraded:
 libavcodec57 libavcodec58 libavdevice57 libavdevice58 libavfilter6 libavfilter7 libavformat57 libavformat58 libavresample3 libavresample4 libavutil55 libavutil56 libpostproc54 libpostproc55 libswresample2 libswresample3
 libswscale4 libswscale5

The following 18 packages are going to change vendor:
 libavcodec57    http://packman.links2linux.de -> openSUSE
 libavcodec58    http://packman.links2linux.de -> openSUSE
 libavdevice57   http://packman.links2linux.de -> openSUSE
 libavdevice58   http://packman.links2linux.de -> openSUSE
 libavfilter6    http://packman.links2linux.de -> openSUSE
 libavfilter7    http://packman.links2linux.de -> openSUSE
 libavformat57   http://packman.links2linux.de -> openSUSE
 libavformat58   http://packman.links2linux.de -> openSUSE
 libavresample3  http://packman.links2linux.de -> openSUSE
 libavresample4  http://packman.links2linux.de -> openSUSE
 libavutil55     http://packman.links2linux.de -> openSUSE
 libavutil56     http://packman.links2linux.de -> openSUSE
 libpostproc54   http://packman.links2linux.de -> openSUSE
 libpostproc55   http://packman.links2linux.de -> openSUSE
 libswresample2  http://packman.links2linux.de -> openSUSE
 libswresample3  http://packman.links2linux.de -> openSUSE
 libswscale4     http://packman.links2linux.de -> openSUSE
 libswscale5     http://packman.links2linux.de -> openSUSE

8 packages to upgrade, 18 to downgrade, 18  to change vendor.
Overall download size: 14.3 MiB. Already cached: 0 B. After the operation, 13.0 MiB will be freed.

**Continue? [y/n/v/...? shows all options] (y): y**

**Checking for file conflicts: ...........................................................................................................................................................................................[done]
( 1/26) Installing: libavutil55-3.4.4-lp152.3.7.x86_64 .................................................................................................................................................................[done]
( 2/26) Installing: libavutil56-4.2.1-lp152.1.4.x86_64 .................................................................................................................................................................[done]
( 3/26) Installing: libswscale4-3.4.4-lp152.3.7.x86_64 .................................................................................................................................................................[done]
( 4/26) Installing: libswresample2-3.4.4-lp152.3.7.x86_64 ..............................................................................................................................................................[done]
( 5/26) Installing: libpostproc54-3.4.4-lp152.3.7.x86_64 ...............................................................................................................................................................[done]****
(25/26) Installing: grub2-snapper-plugin-2.04-lp152.7.18.2.noarch ......................................................................................................................................................[done]
(26/26) Installing: openssh-askpass-gnome-8.1p1-lp152.4.6.1.x86_64 .....................................................................................................................................................[done]
Executing %posttrans scripts ...........................................................................................................................................................................................[done]
There are running programs which still use files and libraries deleted or updated by recent upgrades. They should be restarted to benefit from the latest updates. Run 'zypper ps -s' to list these programs.**

After the reboot

zypper packages --orphaned
Loading repository data...
Reading installed packages...
S  | Repository | Name               | Version                              | Arch
---+------------+--------------------+--------------------------------------+-------
i  | @System    | librtmp1           | 2.4.20151223.fa8646d-pm152.1.9       | x86_64
i  | @System    | libvo-amrwbenc0    | 0.1.3-pm152.1.7                      | x86_64
i  | @System    | libx264-160        | 0.160+git20200702.cde9a933-pm152.1.2 | x86_64
i  | @System    | libx265-192        | 3.4-pm152.1.2                        | x86_64
i  | @System    | libxvidcore4       | 1.3.7-pm152.1.2                      | x86_64

zypper rm --clean-deps librtmp1
Reading installed packages...
Resolving package dependencies...

The following package is going to be REMOVED:
  librtmp1

1 package to remove.
After the operation, 133.1 KiB will be freed.
**Continue? [y/n/v/...? shows all options] (y): **y
(1/1) Removing librtmp1-2.4.20151223.fa8646d-pm152.1.9.x86_64 ..........................................................................................................................................................[done]

zypper rm --clean-deps libvo-amrwbenc0
Reading installed packages...
Resolving package dependencies...

The following package is going to be REMOVED:
  libvo-amrwbenc0

1 package to remove.
After the operation, 128.2 KiB will be freed.
**Continue? [y/n/v/...? shows all options] (y): **y
(1/1) Removing libvo-amrwbenc0-0.1.3-pm152.1.7.x86_64 ..................................................................................................................................................................[done]

zypper rm --clean-deps libx264-160
Reading installed packages...
Resolving package dependencies...

The following package is going to be REMOVED:
  libx264-160

1 package to remove.
After the operation, 1.7 MiB will be freed.
**Continue? [y/n/v/...? shows all options] (y): **y
(1/1) Removing libx264-160-0.160+git20200702.cde9a933-pm152.1.2.x86_64 .................................................................................................................................................[done]
  
zypper rm --clean-deps libx265-192
Reading installed packages...
Resolving package dependencies...

The following package is going to be REMOVED:
  libx265-192

1 package to remove.
After the operation, 15.5 MiB will be freed.
**Continue? [y/n/v/...? shows all options] (y): **y
(1/1) Removing libx265-192-3.4-pm152.1.2.x86_64 ........................................................................................................................................................................[done]
  

Then I deleted the pacman repo through yast and finally did a zypper ref and zypper up

Packages can be removed with a single line of code:

erlangen:~ # zypper packages --orphaned | grep @System | cut -d '|' -f 3 | xargs zypper remove --dry-run --clean-deps  
Reading installed packages... 
Resolving package dependencies... 

The following 17 packages are going to be REMOVED: 
  aocl-linux-aocc aocl-linux-gcc boost-license1_66_0 crazydiskmark hd-idle hll2350dwpdrv imagescan imagescan-plugin-gt-s650 imagescan-plugin-networkscan imagescan-plugin-ocr-engine libboost_filesystem1_66_0 libboost_program_options1_66_0 libboost_system1_66_0 libdvdcss2 mfc255cwcupswrapper mfc255cwlpr stacer 

17 packages to remove. 
After the operation, 644.2 MiB will be freed. 
Continue? [y/n/v/...? shows all options] (y):  
erlangen:~ #