In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article is about how Linux uses the command line to uninstall the installation package. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
First, you need to find a list of all installed packages on Linux.
To uninstall the application, you need to use commands specific to the Linux distribution. For example, use the apt command on Debian/Ubuntu. RHEL/ CentOS/Fedora users need to run dnf or yum commands, and so on.
Environment
Ubuntu 18.04 LTS
ArchLinux
Alpine
Fedora
OpenSUSE
Centos 7
Ubuntu/Debian Uninstall package
Use apt to list the installed packages:
Bob@c14f840ed725:~$ sudo apt list-installed
You can also use the dpkg command to find installed packages:
Bob@c14f840ed725:~$ dpkg-l | grep 'ftp'
Let's uninstall the package:
You can use apt or apt-get to uninstall
Bob@c14f840ed725:~$ sudo apt remove vsftpd or bob@c14f840ed725:~$ sudo apt-get remove vsftpdbob@c14f840ed725:~$ sudo apt remove-- purge vsftpd or bob@c14f840ed725:~$ sudo apt-get remove-- purge vsftpd
Add-- purge option, which means that uninstall deletes the configuration file of the package as well.
Verify that the installation package is installed:
Bob@c14f840ed725:~$ apt list-- installed | grep vimWARNING: apt does not have a stable CLI interface. Use with caution in scripts.vim/bionic-updates,bionic-security,now 2 Use with caution in scripts.vim/bionic-updates,bionic-security,now 8.0.1453-1ubuntu1.3 amd64 [installed] vim-common/bionic-updates,bionic-security,now 2 Use with caution in scripts.vim/bionic-updates,bionic-security,now 8.0.1453-1ubuntu1.3 all [installed,automatic] vim-runtime/bionic-updates,bionic-security,now 2 Use with caution in scripts.vim/bionic-updates,bionic-security,now 8.0.1453-1ubuntu1.3 all [installed Automatic] or bob@c14f840ed725:~$ dpkg-l | grep vimii vim 2 automatic 8.0.1453-1ubuntu1.3 amd64 Vi IMproved-enhanced vi editorii vim-common 2 automatic 8.0.1453-1ubuntu1.3 all Vi IMproved-Common filesii vim-runtime 2 race 8.0.1453-1ubuntu1.3 all Vi IMproved-Runtime files
RHEL/CentOS Uninstall package
We can use the previous command to view all installed packages:
[root@qdzabbix ~] # yum list installed or [root@qdzabbix ~] # rpm-qa can also check whether a package is installed: [root@qdzabbix ~] # yum list installed | grep vsftpdvsftpd.x86_64 3.0.2-25.el7 @ base or [root@qdzabbix ~] # rpm-qa | grep vsftpdvsftpd-3.0.2-25.el7.x86_64 [root@qdzabbix ~] #
Delete the installation package:
[root@qdzabbix ~] # yum-y remove vsftpd
Fedora Uninstall package
You can also use yum or dnf Manager on Fedora. It is recommended to use dnf to install and uninstall packages:
# check whether to install vsftpd [root @ 716bc12a2197 ~] # rpm-qa | grep vsftpd# or [root@716bc12a2197 ~] # dnf list installed | grep vsftpd
Uninstall vsftpd:
[root@716bc12a2197 ~] # dnf remove-y vsftpd
Arch Linux Uninstall package
Use the pacman package manager in Arch Linux:
# query whether to install vsftpd [root @ d201bac103e8 /] # pacman-Q vsftpdvsftpd 3.0.3-6 or [root@d201bac103e8 /] # pacman-Q | grep vsftpdvsftpd 3.0.3-6
Uninstall the installation package:
[root@d201bac103e8 /] # pacman-R vsftpdchecking dependencies...Packages (1) vsftpd-3.0.3-6Total Removed Size: 0.34 MiB:: Do you want to remove these packages? [YBO] y Reloading system manager configuration...: Processing package changes... (1 to 1) removing vsftpd [# #] 100% Reloading system manager configuration...: Running post-transaction hooks... (1 to 2) Skipped: Current root is not booted. (2amp 2) Arming ConditionNeedsUpdate...
OpenSUSE/SUSE Uninstall package
To manage the installation package using the zypper package Manager in OpenSUSE/SUSE, check to see if vsftpd is installed:
23d5ed5dcfc2:/ # zypper packages-- installed-only | grep vsftpdi+ | OSS Update | vsftpd | 3.0.2-28.1 | x86room64v | OSS Update | vsftpd | 3.0.2-25.1 | x86room64v | OSS | vsftpd | 3 .0.2-23.1 | x86 rpm 64 or 23d5ed5dcfc2:/ # rpm-qa | grep vsftpdvsftpd-3.0.2-28.1.x86_64
Uninstall the installation package:
23d5ed5dcfc2:/ # zypper remove vsftpdLoading repository data...Reading installed packages...Resolving package dependencies...The following package is going to be REMOVED: vsftpd1 package to remove.After the operation, 320.9 KiB will be freed.Continue? [y/n/...? Shows all options] (y): y (1 to 1) Removing vsftpd-3.0.2-28.1.x86_64.... [done] Additional rpm output:Failed to connect to bus: No such file or directoryFailed to connect to bus: No such file or directory
Alpine Linux Uninstall package
Using the apk package manager in Alpine Linux for package management, check to see if vsfptd is installed:
~ # apk list-I | grep vsftpd
-I lists only installed packages.
Uninstall the installation package:
~ # apk del vsftpd (1amp 3) Purging vsftpd (3.0.3-r6) (2pm 3) Purging libcap (2.27-r0) (3pm 3) Purging linux-pam (1.3.1-r1) Executing busybox-1.31.1-r9.triggerOK: 6 MiB in 14 packages
Thank you for reading! This is the end of the article on "how to use the command line to uninstall the installation package for Linux". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it out for more people to see!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.