How to prevent certain packages from being updated in CentOS?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












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






share|improve this question

























    up vote
    0
    down vote

    favorite












    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






    share|improve this question























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      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






      share|improve this question













      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








      share|improve this question












      share|improve this question




      share|improve this question








      edited Jun 8 at 12:14
























      asked May 30 at 12:59









      krushnach Chandra

      12




      12




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          1
          down vote













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



          [main]
          ...
          exclude=kernel* redhat-release* whatever-package





          share|improve this answer























          • 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 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 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 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 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 at 11:17










          Your Answer







          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "106"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: false,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );








           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f446907%2fhow-to-prevent-certain-packages-from-being-updated-in-centos%23new-answer', 'question_page');

          );

          Post as a guest






























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          1
          down vote













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



          [main]
          ...
          exclude=kernel* redhat-release* whatever-package





          share|improve this answer























          • 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 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 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 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 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 at 11:17














          up vote
          1
          down vote













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



          [main]
          ...
          exclude=kernel* redhat-release* whatever-package





          share|improve this answer























          • 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 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 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 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 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 at 11:17












          up vote
          1
          down vote










          up vote
          1
          down vote









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



          [main]
          ...
          exclude=kernel* redhat-release* whatever-package





          share|improve this answer















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



          [main]
          ...
          exclude=kernel* redhat-release* whatever-package






          share|improve this answer















          share|improve this answer



          share|improve this answer








          edited May 30 at 14:54


























          answered May 30 at 14:37









          Bruno9779

          1,107415




          1,107415











          • 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 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 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 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 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 at 11:17
















          • 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 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 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 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 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 at 11:17















          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 at 16:39




          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 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 at 16:46




          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 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 at 13:06




          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 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 at 15:59




          okay got it but can you tell me how do i check if opera is in epel?packages or not ..
          – krushnach Chandra
          Jun 1 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 at 11:17




          @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 at 11:17












           

          draft saved


          draft discarded


























           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f446907%2fhow-to-prevent-certain-packages-from-being-updated-in-centos%23new-answer', 'question_page');

          );

          Post as a guest













































































          Popular posts from this blog

          Peggy Mitchell

          Palaiologos

          The Forum (Inglewood, California)