PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Sunday, May 15, 2022

[FIXED] How to stop/disable/hold automatic updates for packages in linux?

 May 15, 2022     apt, linux, package-management, ubuntu, unattended-upgrade     No comments   

Issue

I have installed some packages (Docker, Kubeadm, Kubelet, Kubectl) for my Kubernetes cluster on Ubuntu 18.04 LTS.

I don't want these packages to get auto updated because there will be some issue arises between them when the update happens between one another. I just want to update manually when they are stable.

What is the correct command for stop packages update automatically?

Commands I have used to install them on Ubuntu 18.04

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

sudo add-apt-repository \
   "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
   $(lsb_release -cs) \
   stable"

sudo apt-get update

sudo apt-get install -y docker-ce=18.06.1~ce~3-0~ubuntu

curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -

cat << EOF | sudo tee /etc/apt/sources.list.d/kubernetes.list
deb https://apt.kubernetes.io/ kubernetes-xenial main
EOF

sudo apt-get update

sudo apt-get install -y kubelet=1.12.7-00 kubeadm=1.12.7-00 kubectl=1.12.7-00

Solution

Find of the day :). Ubuntu apt gives you the command to hold the auto update of the package. Thanks to Dirk for giving me the hint.

sudo apt-mark hold docker-ce kubelet kubeadm kubectl


Answered By - Sathishkumar Rakkiyasamy
Answer Checked By - Marilyn (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing