Hi,
According to man zypper the + means that the package/pattern was installed by the user request.
So for example.
zypper --no-refresh se **-t package** -si bash
Loading repository data...
Reading installed packages...
S | Name | Type | Version | Arch | Repository
---+------------------------------+---------+------------------------+--------+-------------------------------------------------------
i+ | ModemManager-bash-completion | package | 1.6.12-lp151.2.4 | x86_64 | Main Repository
i+ | bash | package | 5.0.11-lp151.417.1 | x86_64 | Shell Implementations (openSUSE_Leap_15.1)
i+ | bash-completion | package | 2.7-lp151.4.1 | noarch | Main Repository
i | bash-completion-devel | package | 2.7-lp151.4.1 | noarch | Main Repository
i+ | bash-doc | package | 4.4-lp151.10.3.1 | noarch | Main Update Repository
i+ | bash-lang | package | 5.0.11-lp151.417.1 | noarch | Shell Implementations (openSUSE_Leap_15.1)
i | fd-bash-completion | package | 7.1.0-lp151.8.1 | noarch | all the small tools for the shell (openSUSE_Leap_15.1)
i | fzf-bash-completion | package | 0.20.0-lp151.13.1 | noarch | all the small tools for the shell (openSUSE_Leap_15.1)
i | libvirt-bash-completion | package | 5.1.0-lp151.7.6.1 | noarch | Main Update Repository
i+ | mbimcli-bash-completion | package | 1.16.0-lp151.2.2 | x86_64 | Main Repository
i+ | mpv-bash-completion | package | 3.3.17-lp151.6.1 | noarch | Main Repository
i+ | pulseaudio-bash-completion | package | 11.1-lp151.5.3 | x86_64 | Main Repository
i+ | subversion-bash-completion | package | 1.10.6-lp151.4.3.1 | noarch | Main Update Repository
i+ | systemd-bash-completion | package | 234-lp151.26.7.1 | noarch | Main Update Repository
i+ | youtube-dl-bash-completion | package | 2019.08.13-lp151.2.3.1 | noarch | Main Update Repository
If the first column starts with i+ then it is installed by the user.
Looking for the exact part of the manual.
PAGER='less +/^:space:]]*query\ commands' man zypper
Now like what Malcomlewis posted the argument for the -t option can be one of the following.
package
pattern
product
To show all packages that does not have i+ in the first column from the output of zypper you could use grep(1).
zypper --no-refresh se -t package -si | grep --line-buffered -e '^i^+]'
To show the opposite of the previous output.
zypper --no-refresh se -t package -si | grep --line-buffered -e '^i+'
If you want to search packages/pattern/product from a specific repo you will need to know which repositories are enabled by using zypper.
zypper help lr | grep -- -E
-E, --show-enabled-only Show enabled repos only. Default: false
Now run
zypper lr -E
All the enabled repos should be listed.
To add the specific repo in the search using zypper add the **-r **option.
zypper help se | grep -- '^-r'
-r, --repo <ALIAS|#|URI> Work only with the specified repository.
The example below will show all the installed packages by the user request, that came from repo number 1 (from the output of zypper lr -E)
zypper --no-refresh se -t package -si**r 1 **| grep --line-buffered -e '^i+'
To show the opposite.
zypper --no-refresh se -t package -si**r 1 **| grep --line-buffered -e '^i'
If you’re only interested in the package/pattern/product names you need to use something to parse the output of zypper that is not just line oriented like awk.
To show only package names that was installed by user request.
zypper --no-refresh se -t package -si | awk '$1 == "i+"{print $3;fflush()}'
To show the opposite
zypper --no-refresh se -t package -si | awk '$1 == "i"{print $3;fflush()}'
Redirect the output to a file if you want to save it.