学习啦>学习电脑>操作系统>Linux教程>

linux的yum卸载包命令说明

佳洲分享

  Linux中的yum命令可以通过相关命令对包进行安装、卸载或者更新等,下面由学习啦小编为大家整理了Linux的yum卸载包命令说明的相关知识,希望对大家有帮助!

  linux的yum卸载包命令说明

  1> 使用yum remove 卸载包.

  如下所示:使用'yum remove 包名' 命令卸载包.

  Shell代码

  # yum remove postgresql.x86_64

  Resolving Dependencies

  ---> Package postgresql.x86_64 0:9.0.4-5.fc15 will be erased

  Is this ok [y/N]: y

  Running Transaction

  Erasing : postgresql-9.0.4-5.fc15.x86_64 1/1

  Removed:

  postgresql.x86_64 0:9.0.4-5.fc15

  Complete!

  扩展资料:有关linux的yum安装、更新和查看包的命令

  2> 使用yum install 安装包.

  要安装一个包,使用 'yum install 包名'. 该命令将会自动的安装该包的依赖.

  Shell代码

  # yum install postgresql.x86_64

  Resolving Dependencies

  Install 2 Package(s)

  Is this ok [y/N]: y

  Package(s) data still to download: 3.0 M

  (1/2): postgresql-9.0.4-5.fc15.x86_64.rpm | 2.8 MB 00:11

  (2/2): postgresql-libs-9.0.4-5.fc15.x86_64.rpm | 203 kB 00:00

  ------------------------------------------------------------------

  Total 241 kB/s | 3.0 MB 00:12

  Running Transaction

  Installing : postgresql-libs-9.0.4-5.fc15.x86_64 1/2

  Installing : postgresql-9.0.4-5.fc15.x86_64 2/2

  Complete!

  默认的'yum install'命令, 将会在安装这些包之前 提示你"接受"或"放弃", 如果想要使用yum自动安装包,而不对你进行提示. 使用 -y 选项. 如下所示:

  Shell代码

  # yum -y install postgresql.x86_64

  3> 使用 'yum update'命令升级已存在的包.

  如果你的系统中存在一个旧版本的包, 使用'yum update 包名' 可以使它升级到最新版本. 当然,这个命令也会自动的找出并安装该报的所有必须的依赖.

  Shell代码

  # yum update postgresql.x86_64

  4> 使用'yum search'命令查找包.

  如果你不知道你想要安装的包的准确包名, 可以使用'yum search 关键字', 他将会搜索并列出匹配你的'关键字'的所有记录.

  下面的实例是在yum的资源库中搜索所有匹配关键字'firefox'的包, 并且将其罗列出来.

  Shell代码

  # yum search firefox

  Loaded plugins: langpacks, presto, refresh-packagekit

  ============== N/S Matched: firefox ======================

  firefox.x86_64 : Mozilla Firefox Web browser

  gnome-do-plugins-firefox.x86_64 : gnome-do-plugins for firefox

  mozilla-firetray-firefox.x86_64 : System tray extension for firefox

  mozilla-adblockplus.noarch : Adblocking extension for Mozilla Firefox

  mozilla-noscript.noarch : JavaScript white list extension for Mozilla Firefox

  Name and summary matches only, use "search all" for everything.

    3634875