0

I don't want certain package become updated in my CentOS system, so I did remove the respective repository of the package.

Now if I run system update and upgrade that package are not going to be updated or is there still a chance of getting updates even after removing the repository?

For example, I don't want Opera to get updated so I removed it repository still I get an alert kind of thing to update Opera to latest version, so if I do a system update then would it still update opera?

This is my repository list:

google-chrome                                                                                                                         3/3
home_tange                                                                                                                            2/2
repo id                                           repo name                                                                         status
base/7/x86_64                                     CentOS-7 - Base                                                                    9,911
elrepo                                            ELRepo.org Community Enterprise Linux Repository - el7                               249
*epel/x86_64                                      Extra Packages for Enterprise Linux 7 - x86_64                                    12,582
extras/7/x86_64                                   CentOS-7 - Extras                                                                    305
google-chrome                                     google-chrome                                                                          3
home_tange                                        tange's Home Project (CentOS_CentOS-6)                                                 2
nalimilan-julia/x86_64                            Copr repo for julia owned by nalimilan                                                78
updates/7/x86_64                                  CentOS-7 - Updates                                                                   632
repolist: 23,762


yum provides opera 

home_tange                                                                                                         | 1.3 kB  00:00:00     
nalimilan-julia                                                                                                    | 3.9 kB  00:00:00     
updates                                                                                                            | 3.4 kB  00:00:00     
elrepo/primary_db                                                                                                  | 587 kB  00:00:20     
Loading mirror speeds from cached hostfile
 * base: centos.myfahim.com
 * elrepo: fedora.is
 * epel: repo.ugm.ac.id
 * extras: centos.myfahim.com
 * updates: mirrors.nhanhoa.com
epel                                                                                                                          12588/12588
google-chrome                                                                                                                         3/3
elrepo/filelists_db                                                                                                |  65 kB  00:00:00     
opera-stable-51.0.2830.55-0.x86_64 : Fast and secure web browser
Repo        : @opera
Matched from:
Filename    : /bin/opera



opera-stable-51.0.2830.55-0.x86_64 : Fast and secure web browser
Repo        : @opera
Matched from:
Filename    : /usr/bin/opera

updated my question ,now it looks like opera is the repo as this line says

Repo        : @opera
1

To fix the version of a package, you should simply add to /etc/yum.conf:

[main]
...
exclude=kernel* redhat-release* whatever-package
  • actually i removed the repo for the opera browser but i still see this get latest security alert so my concern is if i restart my browser will it get updated as it happened once , but since it doesn;t have the repo so it shouldn't be updating technically – krushnach Chandra May 31 '18 at 16:39
  • i have posted my repolist ,and i dont see opera in my repo so it mean it shouldn't be getting updated... – krushnach Chandra May 31 '18 at 16:46
  • For opera it is correct, but generally speaking, it is not a good practice. If there was opeera in epel, your solution would not work, for example, or would require you tto give up all epel packages – Bruno9779 Jun 1 '18 at 13:06
  • okay got it but can you tell me how do i check if opera is in epel?packages or not .. – krushnach Chandra Jun 1 '18 at 15:59
  • @krushnach Chandra, to check which a package or command comes from, you can use yum provides <package>. To prevent updates for Opera, you could configure exclude=opera. – U880D Jun 8 '18 at 11:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.