未加星标

How To Safely Ignore A Package From Being Upgraded In Arch Linux

字体大小 | |
[系统(linux) 所属分类 系统(linux) | 发布者 店小二03 | 时间 2017 | 作者 红领巾 ] 0人收藏点击收藏

You might ask Why, on the earth, would I ignore a package from being upgraded? The outdated packages might be vulnerable and not safe to our system, right? Yes!We need to update our system regularly to get latest packages and make our system more secure.However, we need to hold a package or group of packages from being upgraded for some reasons. Since Arch linux is a rolling-distro, some new packages might break the system or some applications might depend on a particular version of a package to work without any problems. That’s why sometimes we need to prevent a package to upgrade to its newer version. Once we are sure that the new package will not cause any issue, compatible with all dependencies and applications, we can then upgrade it to the latest available version.

Download Free eBook: “Docker Containerization Cookbook”

This brief tutorial addresses how to ignore a package from being upgraded in Arch Linux and its derivatives.

Ignore A Package From Being Upgraded In Arch Linux

To ignore a package from being upgraded, you need to add it to IgnorePkg or members of IgnoreGroup in the pacman.conf file.

Say for example, to ignore vlc from being upgraded wuile updating your Arch Linux you need to do the following.

Edit pacman.conf file:

sudo vi /etc/pacman.conf

Add the line “IgnorePkg = vlc” as shown below.

# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup
#IgnorePkg =
IgnorePkg = vlc
#IgnoreGroup =

Save and close the file. To ignore a group of packages, you need to add IgnoreGroup = plasma-desktop , for example.

Whenever you try to update vlc, you will see a warning message like below.

sudo pacman -S vlc Sample output: :: vlc is in IgnorePkg/IgnoreGroup. Install anyway? [Y/n]

To remove this, simply remove or comment out the line IgnorePkg = vlc by adding a # sign in-front of it.

Now, again run the following command to update Vlc:

sudo pacman -S vlc Sample output resolving dependencies...
looking for conflicting packages...
Packages (1) vlc-2.2.4
Total Installed Size: 10.7 MiB
Net Upgrade Size: 2.15 MiB
:: Proceed with installation? [Y/n] y
(1/1) checking keys in keyring [######################] 100%
(1/1) checking package integrity [######################] 100%
(1/1) loading package files [######################] 100%
(1/1) checking for file conflicts [######################] 100%
(1/1) checking available disk space [######################] 100%
:: Processing package changes...
(1/1) upgrading vlc [######################] 100%

As you see in the above output, Vlc has been upgraded to the latest version.

The above method will permanently stop the specified package from being upgraded until you remove it from the ignore list. To do this temporarily, you can run:

sudo pacman -Syu --ignore=vlc

This command will skip vlc package from being updated. Similarly, to skip a package group, just run:

To skip a package group, run:

sudo pacman -Syu --ignoregroup=plasma-desktop

That’s all for now. Hope this helps. If you find this guide useful, please share it on your Social networks and support us.

Cheers!

本文系统(linux)相关术语:linux系统 鸟哥的linux私房菜 linux命令大全 linux操作系统

主题: LinuxDocker
分页:12
转载请注明
本文标题:How To Safely Ignore A Package From Being Upgraded In Arch Linux
本站链接:http://www.codesec.net/view/523020.html
分享请点击:


1.凡CodeSecTeam转载的文章,均出自其它媒体或其他官网介绍,目的在于传递更多的信息,并不代表本站赞同其观点和其真实性负责;
2.转载的文章仅代表原创作者观点,与本站无关。其原创性以及文中陈述文字和内容未经本站证实,本站对该文以及其中全部或者部分内容、文字的真实性、完整性、及时性,不作出任何保证或承若;
3.如本站转载稿涉及版权等问题,请作者及时联系本站,我们会及时处理。
登录后可拥有收藏文章、关注作者等权限...
技术大类 技术大类 | 系统(linux) | 评论(0) | 阅读(16)