Home  >  Article  >  System Tutorial  >  How to use force uninstall technique to uninstall software in Linux?

How to use force uninstall technique to uninstall software in Linux?

WBOY
WBOYOriginal
2024-06-01 18:53:54969browse

Linux is a very stable and secure operating system because the software is designed to only access the resources it has been granted. This means that if you use Linux's default package manager to install software, it is also extremely easy to uninstall it. Moreover, sometimes you may encounter some software that is difficult to uninstall using the package manager. In this case, you need to use the forced uninstall method.

In this article, we will explain how to use the forced uninstall method to uninstall software in Linux. We'll cover three basic methods: using the command line, using uninstall tools, and automatically deleting files. Understanding this approach will help you better manage your Linux system.

Use the command line to force uninstall the software

The most common form of forcefully uninstalling software in Linux is to use the command line. Below are some commonly used commands:

1.Use dpkg command

dpkg is the core command of the Debian package manager. You can use it to manage deb packages (the format of Debian installation packages). If you want to uninstall a deb package, you can use the following command:

sudodpkg–remove–force-allpackage_name.deb

–dpkg: command name

––remove: Specify to delete the deb package

––force-all: Delete all files including uninstalled or damaged files

2.Use rpm command

rpm is the core command of the RedHat package manager. You can use it to manage rpm packages (the format of RedHat installation packages). If you want to uninstall an rpm package, you can use the following command:

sudorpm-e–forcepackage_name.rpm

–rpm: command name

–-e: Specify to uninstall the rpm package

––force: force uninstallation of packages, including damaged files

3. Use apt-get command

apt-get is the core command of Debian and Ubuntu package managers. You can use it to uninstall software installed on your Linux system. If you want to uninstall a software package, you can use the following command:

sudoapt-getremovepackage_name

–apt-get: command name

–remove: Specify to delete the software package

4.Use yum command

yum is the core command of CentOS and Fedora package managers. You can use it to uninstall installed software. If you want to uninstall a software package, you can use the following command:

sudoyumremovepackage_name

–yum: command name

–remove: Specify to delete the software package

Use the uninstall tool

Another way is to use an uninstall tool. Uninstall tools are generally easy to use and allow you to manually find residual files and delete them. Below are some commonly used uninstall tools:

1. Software Center Uninstall Tool

Most Linux distributions have an external software center from which you can install and uninstall software. The uninstall function in the Software Center will help you find and delete all software-related files and configurations. Using the Software Center uninstall tool can reduce the time required to uninstall software using the command line.

2.SynapticPackageManager

Synaptic Package Manager is a visual package manager that allows you to easily search and install packages and resolve dependency issues. It also has an available uninstall feature that allows you to find and remove all unnecessary packages.

Automatically delete files

Automatically deleting files is a relatively simple method, but these methods are risky because you may inadvertently delete a key file in the system. If you want to use these methods, be sure to back up your system in case something unexpected happens.

The following introduces how to automatically delete files:

1. Find the package name

Before you automatically uninstall the software, you need to know the package name of the software so that you know what files to delete. You can use the following command to find the name of a package:

sudoapt-cachesearchsoftware_name

2. Automatically delete files

After finding the software package name, use the following command to delete all files related to the software:

sudorm-rf/usr/share/software_name

–rm: command name

–-rf: Forcefully delete all files and directories (including subdirectories)

–/usr/share/software_name: the installation directory of the software package

In Linux, if you want to uninstall software, it is better to use the package manager. If you have difficulty uninstalling software using a package manager, you can use the command line, an uninstall tool, or automatically delete files. Remember, before using this method, you must back up your system to prevent accidents.

I hope this article can help you master the method of forcefully uninstalling software, allowing you to better manage your Linux system. I wish you a happy use!

Extended reading on related issues:

How to completely uninstall software and delete related files under Linux

The installation files of the rotten cluster program under Linux are placed in a source directory. As long as you find the directory, you can delete it directly.

The rm command is used to delete files or directories. The format is: "rm file". You can take a look at the specific operations. Interpretation of commands under Linux:

linux卸载软件命令_linux命令行卸载软件_linux卸载程序命令

About uninstalling software under Linux system

If installed with Qingyuzen rpm, use rpm-e filename (installation file) to uninstall it in the terminal. If the system is Yuchenxulan fedora, you can also use yumremove filename. Distinguish case!!

The installation and uninstallation of Linux software is still a dilemma that confuses many new users. In Windows, we can use the installation and uninstallation program that comes with the software or "Add/Remove Programs" in the control panel. Similar to Linux environment variables, there is a powerful software installation and uninstallation tool under Linux called RPM. It can be used to complete, install, query, update, and uninstall software. This tool is used from the command line. Enter rpmlinux uninstall software command at the Shell prompt to get help information for the command.

Uninstallation of software

1. Software uninstallation is mainly performed using rpm. To uninstall software, you must first know the name of the software package registered in the system. Type the command:

#rpm-q-a

You can query all software packages installed in the current system.

2. After determining the name of the software to be uninstalled, you can start to actually uninstall the software. Type the following command to uninstall the software: Bo Lead Chao

#rpm-e

The function of parameter e is to put rpm into uninstall mode. Uninstall the package named. Because there are dependencies between various software packages in the system. If it cannot be uninstalled due to dependencies, rpm will give a prompt and stop the uninstallation. You can use the following command to ignore dependencies and start uninstalling directly:

#rpm-e-nodeps

Ignoring the uninstallation of dependencies may cause other software in the system to be difficult to use.

Replenish:

If it is a two's complement software ending with .bin, you can install it in the following way (take so-6_0-beta-bin-linux-zh-Tw1.bin as an example):

Run the simulated terminal in the folder where so-6_0-beta-bin-linux-zh-Tw1.bin is located

enter:

./so-6_0-beta-bin-linux-zh-Tw1.bin

and press Enter!

In fact, you can also enter:

./so and then use key completion

(./ represents the current directory. If the terminal does not open the linux uninstall software command in the directory where the software is located, the corresponding path needs to be entered before the software name.)

If you are in the graphical interface, you can also directly click (or double-click, depending on the specific keyboard settings) to run the uninstallation program!

After installing the Ubuntu20.04.1 operating system, uninstall the software that was not installed by default

That’s it for the introduction of forced uninstallation of software on Linux. Thank you for taking the time to read the content of this website. More about forced uninstallation of software on Linux. Linux is efficient and easy: master the method of forced uninstallation of software. How to completely uninstall software under Linux and Delete the relevant files. Don’t forget to search this site for information about uninstalling software under Linux systems.

Houlangyun is the first choice for servers in Taiwan. 2H2G is available for 10 yuan in the first month.

Houlangyun () provides simple, easy-to-use, affordable Singapore/Malaysian cloud servers and independent servers. IDC+ISP+ICP qualifications. Member of ARIN and APNIC. Mature technical team with 15 years of industry experience.

The above is the detailed content of How to use force uninstall technique to uninstall software in Linux?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn