You are not logged in.

#1 2018-01-05 22:57:18

thebutler
Member
Registered: 2018-01-05
Posts: 4

[SOLVED] Issues uninstalling selinux packages

Hey

I installed the selinux packages from here (https://github.com/archlinuxhardened/selinux), but I now want to remove all the selinux packages which turns out to be tricky since other not-selinux packages are depending on the selinux packages.

Trying to delete the selinux packages will break normal ones:

$ sudo pacman -R libsepol libselinux secilc semodule-utils coreutils-selinux cronie-selinux findutils-selinux iproute2-selinux libsemanage libutil-linux-selinux logrotate-selinux mcstrans openssh-selinux pam-selinux psmisc-selinux restorecond setools sudo-selinux selinux-python
checking dependencies...
error: failed to prepare transaction (could not satisfy dependencies)
:: alsa-utils: removing psmisc-selinux breaks dependency 'psmisc'
:: ca-certificates-utils: removing coreutils-selinux breaks dependency 'coreutils'
:: ca-certificates-utils: removing findutils-selinux breaks dependency 'findutils'
:: ceph-libs: removing libutil-linux-selinux breaks dependency 'libutil-linux'
:: cryptsetup: removing libutil-linux-selinux breaks dependency 'libutil-linux'
:: cups: removing pam-selinux breaks dependency 'pam'
:: dotnet-runtime: removing libutil-linux-selinux breaks dependency 'libuuid.so=1-64'
:: e2fsprogs: removing libutil-linux-selinux breaks dependency 'libutil-linux'
:: glib2: removing libutil-linux-selinux breaks dependency 'libutil-linux'
:: gradm: removing pam-selinux breaks dependency 'pam'
:: inetutils: removing pam-selinux breaks dependency 'pam'
:: kbd: removing pam-selinux breaks dependency 'pam'
:: libnm: removing libutil-linux-selinux breaks dependency 'libutil-linux'
:: libsystemd-selinux: removing libselinux breaks dependency 'libselinux'
:: libutil-linux-selinux-debug: removing libutil-linux-selinux breaks dependency 'libutil-linux-selinux=2.30.1-2'
:: libvirt: removing iproute2-selinux breaks dependency 'iproute2'
:: linux-lts: removing coreutils-selinux breaks dependency 'coreutils'
:: mkinitcpio: removing coreutils-selinux breaks dependency 'coreutils'
:: mkinitcpio: removing findutils-selinux breaks dependency 'findutils'
:: netctl: removing coreutils-selinux breaks dependency 'coreutils'
:: netctl: removing iproute2-selinux breaks dependency 'iproute2'
:: networkmanager: removing iproute2-selinux breaks dependency 'iproute2'
:: openvpn: removing iproute2-selinux breaks dependency 'iproute2'
:: pkgstats: removing coreutils-selinux breaks dependency 'coreutils'
:: policycoreutils: removing libsemanage breaks dependency 'libsemanage>=2.7'
:: policycoreutils: removing pam-selinux breaks dependency 'pam'
:: polkit: removing pam-selinux breaks dependency 'pam'
:: selinux-dbus-config: removing selinux-python breaks dependency 'selinux-python'
:: selinux-python2: removing libsemanage breaks dependency 'libsemanage>=2.7'
:: selinux-python2: removing setools breaks dependency 'setools>=4.0.0'
:: selinux-sandbox: removing selinux-python breaks dependency 'selinux-python'
:: shadow-selinux: removing pam-selinux breaks dependency 'pam-selinux'
:: shadow-selinux: removing libsemanage breaks dependency 'libsemanage'
:: slim: removing pam-selinux breaks dependency 'pam'
:: sshfs: removing openssh-selinux breaks dependency 'openssh'
:: systemd-selinux: removing pam-selinux breaks dependency 'pam-selinux'
:: util-linux-selinux: removing pam-selinux breaks dependency 'pam-selinux'
:: util-linux-selinux: removing coreutils-selinux breaks dependency 'coreutils-selinux'
:: util-linux-selinux: removing libutil-linux-selinux breaks dependency 'libutil-linux-selinux'
:: vpnc: removing iproute2-selinux breaks dependency 'iproute2'
:: wget: removing libutil-linux-selinux breaks dependency 'libutil-linux'
:: xfsprogs: removing libutil-linux-selinux breaks dependency 'libutil-linux'

Trying to update the normal ones does not do the job either

$ sudo pacman -S --force coreutils findutils iproute2 pam openssh libutil-linux psmisc
resolving dependencies...
looking for conflicting packages...
:: iproute2 and iproute2-selinux are in conflict (iproute). Remove iproute2-selinux? [y/N] y
:: coreutils and coreutils-selinux are in conflict. Remove coreutils-selinux? [y/N] y
:: findutils and findutils-selinux are in conflict. Remove findutils-selinux? [y/N] y
:: libutil-linux and libutil-linux-selinux are in conflict. Remove libutil-linux-selinux? [y/N] y
:: openssh and openssh-selinux are in conflict. Remove openssh-selinux? [y/N] y
:: pam and pam-selinux are in conflict. Remove pam-selinux? [y/N] y
:: psmisc and psmisc-selinux are in conflict. Remove psmisc-selinux? [y/N] y
error: failed to prepare transaction (could not satisfy dependencies)
:: cronie-selinux: removing pam-selinux breaks dependency 'pam-selinux'
:: libutil-linux-selinux-debug: removing libutil-linux-selinux breaks dependency 'libutil-linux-selinux=2.30.1-2'
:: shadow-selinux: removing pam-selinux breaks dependency 'pam-selinux'
:: sudo-selinux: removing pam-selinux breaks dependency 'pam-selinux'
:: systemd-selinux: removing pam-selinux breaks dependency 'pam-selinux'
:: util-linux-selinux: removing pam-selinux breaks dependency 'pam-selinux'
:: util-linux-selinux: removing coreutils-selinux breaks dependency 'coreutils-selinux'
:: util-linux-selinux: removing libutil-linux-selinux breaks dependency 'libutil-linux-selinux'

Is there a solution to this without having to reinstall the whole system?

Last edited by thebutler (2018-01-05 23:23:34)

Offline

#2 2018-01-05 23:00:49

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: [SOLVED] Issues uninstalling selinux packages

Installing the normal packages will work, you just have to do them all in one go. Also you shouldn't be using --force.

pacman -S coreutils findutils iproute2 pam openssh libutil-linux psmisc cronie libutil-linux shadow sudo systemd util-linux

No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#3 2018-01-05 23:11:33

thebutler
Member
Registered: 2018-01-05
Posts: 4

Re: [SOLVED] Issues uninstalling selinux packages

Thanks, but the reason why I added --force was because it didn't work without. But I'll remember it for next time.
Unfortunately that didn't entirely work either. Is there no command argument to remove dependencies as well?

sudo pacman -S coreutils findutils iproute2 pam openssh libutil-linux psmisc cronie libutil-linux shadow sudo systemd util-linux
warning: skipping target: libutil-linux
resolving dependencies...
looking for conflicting packages...
:: iproute2 and iproute2-selinux are in conflict (iproute). Remove iproute2-selinux? [y/N] y
:: cronie and cronie-selinux are in conflict (cron). Remove cronie-selinux? [y/N] y
:: systemd and systemd-selinux are in conflict (nss-myhostname). Remove systemd-selinux? [y/N] y
:: util-linux and util-linux-selinux are in conflict (eject). Remove util-linux-selinux? [y/N] y
:: coreutils and coreutils-selinux are in conflict. Remove coreutils-selinux? [y/N] y
:: findutils and findutils-selinux are in conflict. Remove findutils-selinux? [y/N] y
:: libutil-linux and libutil-linux-selinux are in conflict. Remove libutil-linux-selinux? [y/N] y
:: openssh and openssh-selinux are in conflict. Remove openssh-selinux? [y/N] y
:: pam and pam-selinux are in conflict. Remove pam-selinux? [y/N] y
:: psmisc and psmisc-selinux are in conflict. Remove psmisc-selinux? [y/N] y
:: shadow and shadow-selinux are in conflict. Remove shadow-selinux? [y/N] y
:: sudo and sudo-selinux are in conflict. Remove sudo-selinux? [y/N] y
error: failed to prepare transaction (could not satisfy dependencies)
:: libutil-linux-selinux-debug: removing libutil-linux-selinux breaks dependency 'libutil-linux-selinux=2.30.1-2'
:: shadow-selinux-debug: removing shadow-selinux breaks dependency 'shadow-selinux=4.5-2'
:: systemd-sysvcompat-selinux: removing systemd-selinux breaks dependency 'systemd-selinux'
:: util-linux-selinux-debug: removing util-linux-selinux breaks dependency 'util-linux-selinux=2.30.1-2'

Edit:

That did the job. Thanks smile
NOT RECOMMENDED SINCE IT IGNORES DEPENDENCIES

sudo pacman -Sdd coreutils findutils iproute2 pam openssh libutil-linux psmisc cronie libutil-linux shadow sudo systemd util-linux

Edit2:
After Ioqs comment, the proper way would be. Watch out when reinstalling sudo, which can cause the existing sudoers file to be overwritten by the default one without your user in it.

pacman -R systemd-sysvcompat-selinux  util-linux-selinux-debug shadow-selinux-debug libutil-linux-selinux-debug
pacman -S coreutils findutils iproute2 pam openssh libutil-linux psmisc cronie libutil-linux shadow sudo systemd util-linux systemd-sysvcompat

Last edited by thebutler (2018-01-06 09:55:03)

Offline

#4 2018-01-05 23:23:28

loqs
Member
Registered: 2014-03-06
Posts: 17,192

Re: [SOLVED] Issues uninstalling selinux packages

You could not have removed util-linux-selinux-debug,  shadow-selinux-debug and libutil-linux-selinux-debug then run the pacman command but with systemd-sysvcompat added instead of dropping dependency checking?

Offline

#5 2018-01-05 23:45:39

thebutler
Member
Registered: 2018-01-05
Posts: 4

Re: [SOLVED] Issues uninstalling selinux packages

I agree you are probably right. I was just happy that something worked and only realized later that ignoring the warnings was not the best option.
Reinstalling sudo unfortunately kicked my user out of the sudoers file which took me a little time to restore.

Offline

Board footer

Powered by FluxBB