【Linux】How to Uninstall a Program in Linux(如何卸载Linux系统的应用程序)

How to Uninstall a Program in Linux
如何卸载Linux系统的应用程序
译/ 疯子
Linux has many ways to install programs. The graphical package manager, RPMs, the Debian package manager, the apt and yum utilities, and compiling directly from source code are the most popular methods. Uninstalling a program depends on the way you installed the application in the first place. In order to complete the process, you must know the way the program was installed and the exact name of the program. The following steps explain the uninstall process and commands for each of the most popular installation methods.
Linux系统有多种方法安装程序,其中最流行的安装方法是通过图形包管理器、RPM包、 Debian包管理器、apt和yum程序文件,还有通过源代码编译链接安装的。不同的安装方法有不同的卸载方式。为了能达到完全卸载的结果,你必须知道这个程序的安装方法,以及程序准确的名字,以下是对这几种流行的安装程序方法的卸载步骤的解释:
Instructions(说明)

1、 Click on the program and choose uninstall in the graphical package manager if the program was installed via the package manager.
如果是通过包管理器安装的程序,可以直接通过图形包管理器直接点击卸载。
2、 Issue the command "rpm -e program_name" if the program was installed via an .rpm file.
如果是通过 .rpm程序包安装的程序,需要在命令窗口运行  rpm -eprogram_name命令。
3、Type the command "sudo dpkg -r program_name" if the program was installed via the Debian package manager(.deb).
如果是通过 .deb 程序包安装的程序 ,需要在命令窗口运行  sudo dpkg -rprogram_name 命令。
4、 Enter the command "sudo apt-get remove program_name" if the program was installed from the command line via the apt utility. This command only removes the program while leaving the configuration files behind. If you want to totally remove the program and all of its files, use the command "apt-get --purge remove program_name".
如果是通过apt这种方式,需要运行 sudo apt-get remove program_name命令。但这种方式会留下程序的认证、设置文件,如果你想彻底的删除,就用 apt-get  --purge  remove  program_name命令。
5、 Issue the command "yum remove program_name" if the program was installed from the command line via the yum utility.
如果是通过 yum这种方式安装,运行 yum removeprogram_name 命令。
6、 Enter the directory that holds the make files and type "make uninstall" if the program was installed from source code.
如果程序是通过编译链接安装的,需要在命令窗口切换到这个程序的 make files的目录,再运行 make uninstall命令。

原文链接:http://www.ehow.com/how_5079497_uninstall-program-linux.html
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
### 回答1: 在 Linux卸载通过 make install 安装到系统文件夹中的程序,可以使用 make uninstall 命令。需要注意的是,这需要在安装时使用相同的配置选项才能正常工作。如果不能使用 make uninstall,可以手动删除程序安装的文件。 ### 回答2: 在Linux系统中,如果你使用了`make install`命令将程序安装到系统文件夹中,你可以通过以下步骤卸载这些程序: 1. 打开终端。 2. 使用`cd`命令切换到你安装程序的目录。该目录通常是你运行`make install`命令时所指定的目录,默认情况下是`/usr/local`。 3. 运行`make uninstall`命令。如果该命令可用,它将卸载程序并删除相关文件。但并非所有程序都提供这个卸载选项,所以你可能需要继续执行下面的步骤。 4. 如果没有`make uninstall`命令,可以通过查看`Makefile`文件来确定程序的安装位置和文件列表。使用文本编辑器打开`Makefile`文件。 5. 在`Makefile`文件中,查找并记录下安装的文件列表。这些文件通常包括二进制文件、库文件、配置文件以及其他相关文件。 6. 运行`rm`命令删除这些文件。例如,如果安装的二进制文件位于`/usr/local/bin`目录下,你可以运行`sudo rm /usr/local/bin/程序名称`删除它。 7. 继续删除其他安装的文件,确保不遗漏。 8. 如果你之前使用了`make install`的`--prefix`选项指定了其他目录,也要在该目录下重复上述步骤,删除对应的文件。 9. 删除可能存在的相关配置文件。这些配置文件通常位于`/etc`目录下。你可以使用`sudo rm /etc/程序名称`命令来删除它们。 10. 最后,在终端中运行`sudo updatedb`命令以更新系统文件搜索索引。 通过以上步骤,你可以将通过`make install`安装到系统文件夹中的程序完全卸载。请注意,操作系统本身的文件不可删除,只能删除自行安装的程序文件。 ### 回答3: 在Linux中,卸载已经通过"make install"命令安装到系统文件夹中的程序可以按照以下步骤进行: 1. 打开终端或命令行界面。 2. 使用"cd"命令进入已安装程序所在的目录。通常情况下,"make install"会将程序安装到默认目录,即/usr/local目录下。所以可以使用如下命令进入该目录: `cd /usr/local` 3. 查找已安装的程序。如果安装程序的时候没有指定安装目录,则可能需要通过"find"命令来查找具体的安装路径。例如,查找名称为"program"的程序可以使用如下命令: `find . -name program` 4. 找到要卸载的程序后,使用"rm"命令将其从系统中删除。例如,要删除名为"program"的程序可以使用如下命令: `rm -rf ./program` 这里的"-rf"选项用于递归删除程序及其子目录和文件,并且不再显示提示框。 5. 在完成上述步骤后,已经成功卸载了通过"make install"安装到系统文件夹中的程序。 请注意,在卸载程序时需小心操作,确保卸载的是正确的程序,并且备份重要的数据以防止误删除。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值