cockpit-project / cockpit

Cockpit is a web-based graphical interface for servers.
http://www.cockpit-project.org/
GNU Lesser General Public License v2.1
11.24k stars 1.11k forks source link

uninstall/remove cockpit #12507

Closed mehdiMj-ir closed 5 years ago

mehdiMj-ir commented 5 years ago

hi, I wondering how can I uninstall/remove cockpit from my VPS (centos/ubuntu) server. I searched a lot but, I couldn't find any documents or instructions to HOW To Do It!. thanks.

martinpitt commented 5 years ago

There's nothing special about it -- sudo apt purge cockpit?

mehdiMj-ir commented 5 years ago

hi again, I have cockpit on my centos VPS and tried removing this with:

sudo systemctl stop cockpit
sudo systemctl disable cockpit
sudo yum remove cockpit

and even sudo rpm -e cockpit but when I use my.public.I.P:9090 still login page shows up! I remove the service in firewalld, reload firewalld and reboot my VM sudo firewall-cmd --permanent --remove-service=cockpit its fine now. after all, I think the project should have documentation to how remove the program. thanks for reply.

marusak commented 5 years ago

sudo systemctl stop cockpit

This is shortcut for sudo systemctl stop cockpit.service. You need to stop the cockpit.socket (you can do it with sudo systemctl stop cockpit.socket. (Not sure about what version of systemd you have, but on mine system when I am stopping the service it notifies me that the socket can still activate the service).

sudo yum remove cockpit

That should work. It should also remove as dependency cockpit-ws.

mehdiMj-ir commented 5 years ago

thanks. I liked this program, but anyways, uninstall instruction is missing on documentation :)

zeduperes commented 4 years ago

hi again, I have cockpit on my centos VPS and tried removing this with:

sudo systemctl stop cockpit
sudo systemctl disable cockpit
sudo yum remove cockpit

and even sudo rpm -e cockpit but when I use my.public.I.P:9090 still login page shows up! I remove the service in firewalld, reload firewalld and reboot my VM sudo firewall-cmd --permanent --remove-service=cockpit its fine now. after all, I think the project should have documentation to how remove the program. thanks for reply.

For uninstalling on Centos you should try:

systemctl stop cockpit
rpm -e cockpit-system
rpm -e cockpit-bridge
rpm -e cockpit-ws
rm -R -f /run/cockpit
rm -R -f /etc/cockpit
rm -R -f /usr/share/cockpit
rm -R -f /var/lib/selinux/targeted/active/modules/100/cockpit
rm -R -f /usr/share/selinux/targeted/default/active/modules/100/cockpit
ScriptedBot commented 3 years ago

Apparently in Centos 8 it doesn't seem possible to remove cockpit or any of its associated packages without removing a lot of other essential packages due to their dependency on cockpit even though the service is disabled.

And even though the cockpit-motd service is disabled it still shows the the annoying message - Activate the web console with: systemctl enable --now cockpit.socket in message of the day.

I traced the message to the file /usr/share/cockpit/motd/inactive.motd. Truncating that file with > /usr/share/cockpit/motd/inactive.motd got rid of the annoying message.

martinpitt commented 3 years ago

@ScriptedBot : There should not be essential packages that depend on cockpit. sudo dnf remove cockpit-system should clean up things enough. It will also ask you for confirmation, so you can see what it would do, and abort if necessary. What does it say for you and which packages would be removed that you care about?

ScriptedBot commented 3 years ago

You are correct. I am not sure since when centos started using autoremove by default on packages with no dependencies. So when I tried uninstalling cockpit it listed 40+ packages for removal even on a fresh install of centos. I incorrectly assumed that all those 40+ packages were dependent on cockpit which doesn't seem to be the case. Adding the --noautoremove flag to dnf got it working as intended.

martinpitt commented 3 years ago

@ScriptedBot : These could also just be packages that cockpit depends on, like libraries or udisks; these are the ones controlled by "autoremove"; usually removing them is desired, especially if it's libraries. I thought you meant other packages that depend on cockpit, there shouldn't be too many of those (and certainly not in the default install). Thanks for the clarification!

josephtingiris commented 3 years ago

On an f33 server, I run dnf remove cockpit-system remove cockpit-bridge and then rpm -qa | grep cockpit produces nothing.

However, there will be some leftovers that must be removed manually ...

/etc/cockpit
/etc/cockpit/ws-certs.d
/etc/cockpit/ws-certs.d/0-self-signed-ca.pem
/etc/cockpit/ws-certs.d/0-self-signed.cert
/usr/share/cockpit # empty dir
/usr/share/cockpit/static
/usr/share/cockpit/static/fonts # empty dir
/usr/share/doc/cockpit # empty dir

... so follow up with rm -rf /etc/cockpit && rm -rf /usr/share/cockpit && rm -rf /usr/share/doc/cockpit

Now it's gone. The only remnants are the cockpit plugins that sos & selinux-policy-targeted provide. Both of those packages are in f33 workstations, too, and they support more than just cockpit. IMHO, sos is useless and can be removed without issue, but removing selinux-policy-targeted makes a mess (if you use selinux).

rvencu commented 3 years ago

sudo apt remove cockpit* would work fine by removing any cockpit related packages

grand-lotus-iroh commented 3 years ago

sudo apt remove cockpit* would work fine by removing any cockpit related packages

Thank you very much for this, I too was looking for docs to uninstall this software and it was not able to be found. Appreciate your help.

runbing commented 2 years ago

Thanks for your reminder @rvencu. Using sudo yum remove cockpit* on CentOS Stream also works.

Takerman commented 1 year ago

There's nothing special about it -- sudo apt purge cockpit?

I don't know why there are thumbs down... it worked for me apt remove --purge cockpit*

DZ-ABDLHAKIM commented 1 year ago

sudo apt remove cockpit* would work fine by removing any cockpit related packages

Thanks

bbaassssiiee commented 1 year ago

Removing cockpit drags lots of other packages down the drain:

# sudo yum remove cockpit
Dependencies resolved.
======================================================================================================================== Package                                 Architecture    Version                              Repository           Size
========================================================================================================================Removing:
 cockpit                                 x86_64          286.1-1.el8                          @baseos              59 k
Removing unused dependencies:
 PackageKit                              x86_64          1.1.12-6.el8                         @AppStream          2.6 M
 PackageKit-glib                         x86_64          1.1.12-6.el8                         @AppStream          506 k
 abattis-cantarell-fonts                 noarch          0.0.25-6.el8                         @AppStream          295 k
 almalinux-logos                         x86_64          84.5-1.el8                           @AppStream          374 k
 cairo                                   x86_64          1.15.12-6.el8                        @AppStream          1.7 M
 cairo-gobject                           x86_64          1.15.12-6.el8                        @AppStream           36 k
 clevis                                  x86_64          15-14.el8                            @appstream          123 k
 clevis-luks                             x86_64          15-14.el8                            @appstream           72 k
 cockpit-bridge                          x86_64          286.1-1.el8                          @baseos             792 k
 cockpit-packagekit                      noarch          286.2-1.el8_8.alma                   @appstream          674 k
 cockpit-storaged                        noarch          286.2-1.el8_8.alma                   @appstream          670 k
 cockpit-system                          noarch          286.1-1.el8                          @baseos             3.9 M
 cockpit-ws                              x86_64          286.1-1.el8                          @baseos             1.3 M
 dejavu-fonts-common                     noarch          2.35-7.el8                           @anaconda           143 k
 dejavu-sans-mono-fonts                  noarch          2.35-7.el8                           @anaconda           1.1 M
 device-mapper-multipath                 x86_64          0.8.4-37.el8                         @baseos             294 k
 device-mapper-multipath-libs            x86_64          0.8.4-37.el8                         @baseos             786 k
 fontconfig                              x86_64          2.13.1-4.el8                         @anaconda           694 k
 fontpackages-filesystem                 noarch          1.44-22.el8                          @anaconda             0
 gdk-pixbuf2                             x86_64          2.36.12-5.el8                        @anaconda           2.5 M
 glib-networking                         x86_64          2.56.1-1.1.el8                       @anaconda           519 k
 gsettings-desktop-schemas               x86_64          3.32.0-6.el8                         @anaconda           4.0 M
 iscsi-initiator-utils                   x86_64          6.2.1.4-8.git095f59c.el8_8           @baseos             1.7 M
 iscsi-initiator-utils-iscsiuio          x86_64          6.2.1.4-8.git095f59c.el8_8           @baseos             185 k
 isns-utils-libs                         x86_64          0.99-1.el8                           @anaconda           516 k
 jose                                    x86_64          10-2.el8                             @AppStream          125 k
 jq                                      x86_64          1.6-6.el8                            @appstream          440 k
 libX11                                  x86_64          1.6.8-5.el8                          @AppStream          1.3 M
 libX11-common                           noarch          1.6.8-5.el8                          @AppStream          1.3 M
 libXau                                  x86_64          1.0.9-3.el8                          @AppStream           60 k
 libXext                                 x86_64          1.3.4-1.el8                          @AppStream           90 k
 libXrender                              x86_64          0.9.10-7.el8                         @AppStream           51 k
 libappstream-glib                       x86_64          0.7.14-3.el8                         @anaconda           1.0 M
 libblockdev-lvm                         x86_64          2.28-2.el8                           @appstream           61 k
 libjose                                 x86_64          10-2.el8                             @AppStream          168 k
 libluksmeta                             x86_64          9-4.el8                              @AppStream           42 k
 libmodman                               x86_64          2.0.1-17.el8                         @anaconda            68 k
 libproxy                                x86_64          0.4.15-5.2.el8                       @anaconda           195 k
 libsoup                                 x86_64          2.62.3-3.el8                         @baseos             1.5 M
 libstemmer                              x86_64          0-10.585svn.el8                      @anaconda           353 k
 libxcb                                  x86_64          1.13.1-1.el8                         @AppStream          1.3 M
 luksmeta                                x86_64          9-4.el8                              @AppStream           25 k
 oniguruma                               x86_64          6.8.2-2.el8                          @AppStream          676 k
 policycoreutils-python-utils            noarch          2.9-24.el8                           @baseos             138 k
 python3-cairo                           x86_64          1.16.3-6.el8                         @AppStream          317 k
 python3-gobject                         x86_64          3.28.3-2.el8                         @AppStream           16 k
 python3-html5lib                        noarch          1:0.999999999-6.el8                  @AppStream          1.1 M
 python3-libxml2                         x86_64          2.9.7-16.el8_8.1                     @baseos             1.3 M
 python3-lxml                            x86_64          4.2.3-4.el8                          @AppStream          4.8 M
 python3-psutil                          x86_64          5.4.3-11.el8                         @AppStream          1.9 M
 python3-pydbus                          noarch          0.6.0-5.el8                          @AppStream          122 k
 python3-tracer                          noarch          0.7.5-2.el8                          @AppStream          299 k
 python3-webencodings                    noarch          0.5.1-6.el8                          @AppStream           72 k
 setroubleshoot-plugins                  noarch          3.3.14-1.el8                         @AppStream          2.6 M
 setroubleshoot-server                   x86_64          3.3.26-5.el8                         @AppStream          1.3 M
 sscg                                    x86_64          3.0.0-7.el8                          @appstream          103 k
 tpm2-tools                              x86_64          4.1.1-5.el8                          @anaconda           4.6 M
 tracer-common                           noarch          0.7.5-2.el8                          @AppStream           33 k
 udisks2-iscsi                           x86_64          2.9.0-13.el8                         @appstream           52 k
 udisks2-lvm2                            x86_64          2.9.0-13.el8                         @appstream          101 k
 userspace-rcu                           x86_64          0.10.1-4.el8                         @anaconda           318 k

Transaction Summary
========================================================================================================================Remove  62 Packages
martinpitt commented 1 year ago

@bbaassssiiee Yes it does -- these were installed only because cockpit depends on them. That works as intended, what's wrong with this? Also, if there is something wrong with it, please file a Fedora bugzilla -- in the upstream cockpit project we have no influence on how dnf works.

SunShine2020299 commented 10 months ago

在 f33 服务器上,我运行dnf remove cockpit-system remove cockpit-bridgerpm -qa | grep cockpit没有产生任何结果。

但是,会有一些残留物必须手动删除......

/etc/cockpit
/etc/cockpit/ws-certs.d
/etc/cockpit/ws-certs.d/0-self-signed-ca.pem
/etc/cockpit/ws-certs.d/0-self-signed.cert
/usr/share/cockpit # empty dir
/usr/share/cockpit/static
/usr/share/cockpit/static/fonts # empty dir
/usr/share/doc/cockpit # empty dir

...所以跟进rm -rf /etc/cockpit && rm -rf /usr/share/cockpit && rm -rf /usr/share/doc/cockpit

现在它消失了。sos唯一剩下的是&提供的驾驶舱插件selinux-policy-targeted。这两个软件包也都在 f33 工作站中,并且它们支持的不仅仅是驾驶舱。恕我直言,sos没有用,可以毫无问题地删除,但删除selinux-policy-targeted会造成混乱(如果您使用 selinux)。

您的评论对我有帮助,谢谢您

rodraen commented 3 months ago

hi again, I have cockpit on my centos VPS and tried removing this with:

sudo systemctl stop cockpit
sudo systemctl disable cockpit
sudo yum remove cockpit

and even sudo rpm -e cockpit but when I use my.public.I.P:9090 still login page shows up! I remove the service in firewalld, reload firewalld and reboot my VM sudo firewall-cmd --permanent --remove-service=cockpit its fine now. after all, I think the project should have documentation to how remove the program. thanks for reply.

спасибо, помогло