Disable apt upgrades globally
Clash Royale CLAN TAG#URR8PPP
I know that via apt-mark hold <packagename>
you can disable upgrades for a specific package.
Is there a way to disable / freeze the apt upgrade
globally?
P.S: I do not want to disable automatic updates; I want to permanently lock the process of apt upgrade
.
I am launching a custom AMI on EC2 and the cloudt-init
module performs an upgrade which I want to prevent by passing the appropriate command to user-data
apt
add a comment |
I know that via apt-mark hold <packagename>
you can disable upgrades for a specific package.
Is there a way to disable / freeze the apt upgrade
globally?
P.S: I do not want to disable automatic updates; I want to permanently lock the process of apt upgrade
.
I am launching a custom AMI on EC2 and the cloudt-init
module performs an upgrade which I want to prevent by passing the appropriate command to user-data
apt
Do you still want to be able to install packages withapt install
?
– Stephen Kitt
Mar 6 at 16:41
no it is a completely static EC2 instance that I spin up periodically; I do not ever want to runapt-anything
– pkaramol
Mar 6 at 16:47
add a comment |
I know that via apt-mark hold <packagename>
you can disable upgrades for a specific package.
Is there a way to disable / freeze the apt upgrade
globally?
P.S: I do not want to disable automatic updates; I want to permanently lock the process of apt upgrade
.
I am launching a custom AMI on EC2 and the cloudt-init
module performs an upgrade which I want to prevent by passing the appropriate command to user-data
apt
I know that via apt-mark hold <packagename>
you can disable upgrades for a specific package.
Is there a way to disable / freeze the apt upgrade
globally?
P.S: I do not want to disable automatic updates; I want to permanently lock the process of apt upgrade
.
I am launching a custom AMI on EC2 and the cloudt-init
module performs an upgrade which I want to prevent by passing the appropriate command to user-data
apt
apt
edited Mar 6 at 15:52
Rui F Ribeiro
41.9k1483142
41.9k1483142
asked Mar 6 at 15:16
pkaramolpkaramol
718621
718621
Do you still want to be able to install packages withapt install
?
– Stephen Kitt
Mar 6 at 16:41
no it is a completely static EC2 instance that I spin up periodically; I do not ever want to runapt-anything
– pkaramol
Mar 6 at 16:47
add a comment |
Do you still want to be able to install packages withapt install
?
– Stephen Kitt
Mar 6 at 16:41
no it is a completely static EC2 instance that I spin up periodically; I do not ever want to runapt-anything
– pkaramol
Mar 6 at 16:47
Do you still want to be able to install packages with
apt install
?– Stephen Kitt
Mar 6 at 16:41
Do you still want to be able to install packages with
apt install
?– Stephen Kitt
Mar 6 at 16:41
no it is a completely static EC2 instance that I spin up periodically; I do not ever want to run
apt-anything
– pkaramol
Mar 6 at 16:47
no it is a completely static EC2 instance that I spin up periodically; I do not ever want to run
apt-anything
– pkaramol
Mar 6 at 16:47
add a comment |
2 Answers
2
active
oldest
votes
If you never need apt
, you can remove it — it’s not a required or essential package, “merely” important. apt
itself will loudly complain if you try this, and even tell you that it’s essential, but that’s not quite accurate (apt
lumps essential and important packages together).
You can also effectively prevent apt
from updating, upgrading or installing packages, without removing apt
itself, by disabling all its repositories:
sudo rm -f /etc/apt/sources.list /etc/apt/sources.list.d/*
or less drastically
sudo mv /etc/apt/sources.list,.bak
for file in /etc/apt/sources.list.d/*; do if [ -f "$file" ]; then sudo mv "$file" "$file.bak"; fi; done
add a comment |
Even less drastically: Just put a # in front of every line of /etc/apt/sources.list
:
#deb http://cdn-fastly.deb.debian.org/debian stable main
add a comment |
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',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f504734%2fdisable-apt-upgrades-globally%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
If you never need apt
, you can remove it — it’s not a required or essential package, “merely” important. apt
itself will loudly complain if you try this, and even tell you that it’s essential, but that’s not quite accurate (apt
lumps essential and important packages together).
You can also effectively prevent apt
from updating, upgrading or installing packages, without removing apt
itself, by disabling all its repositories:
sudo rm -f /etc/apt/sources.list /etc/apt/sources.list.d/*
or less drastically
sudo mv /etc/apt/sources.list,.bak
for file in /etc/apt/sources.list.d/*; do if [ -f "$file" ]; then sudo mv "$file" "$file.bak"; fi; done
add a comment |
If you never need apt
, you can remove it — it’s not a required or essential package, “merely” important. apt
itself will loudly complain if you try this, and even tell you that it’s essential, but that’s not quite accurate (apt
lumps essential and important packages together).
You can also effectively prevent apt
from updating, upgrading or installing packages, without removing apt
itself, by disabling all its repositories:
sudo rm -f /etc/apt/sources.list /etc/apt/sources.list.d/*
or less drastically
sudo mv /etc/apt/sources.list,.bak
for file in /etc/apt/sources.list.d/*; do if [ -f "$file" ]; then sudo mv "$file" "$file.bak"; fi; done
add a comment |
If you never need apt
, you can remove it — it’s not a required or essential package, “merely” important. apt
itself will loudly complain if you try this, and even tell you that it’s essential, but that’s not quite accurate (apt
lumps essential and important packages together).
You can also effectively prevent apt
from updating, upgrading or installing packages, without removing apt
itself, by disabling all its repositories:
sudo rm -f /etc/apt/sources.list /etc/apt/sources.list.d/*
or less drastically
sudo mv /etc/apt/sources.list,.bak
for file in /etc/apt/sources.list.d/*; do if [ -f "$file" ]; then sudo mv "$file" "$file.bak"; fi; done
If you never need apt
, you can remove it — it’s not a required or essential package, “merely” important. apt
itself will loudly complain if you try this, and even tell you that it’s essential, but that’s not quite accurate (apt
lumps essential and important packages together).
You can also effectively prevent apt
from updating, upgrading or installing packages, without removing apt
itself, by disabling all its repositories:
sudo rm -f /etc/apt/sources.list /etc/apt/sources.list.d/*
or less drastically
sudo mv /etc/apt/sources.list,.bak
for file in /etc/apt/sources.list.d/*; do if [ -f "$file" ]; then sudo mv "$file" "$file.bak"; fi; done
answered Mar 6 at 17:02
Stephen KittStephen Kitt
179k25407485
179k25407485
add a comment |
add a comment |
Even less drastically: Just put a # in front of every line of /etc/apt/sources.list
:
#deb http://cdn-fastly.deb.debian.org/debian stable main
add a comment |
Even less drastically: Just put a # in front of every line of /etc/apt/sources.list
:
#deb http://cdn-fastly.deb.debian.org/debian stable main
add a comment |
Even less drastically: Just put a # in front of every line of /etc/apt/sources.list
:
#deb http://cdn-fastly.deb.debian.org/debian stable main
Even less drastically: Just put a # in front of every line of /etc/apt/sources.list
:
#deb http://cdn-fastly.deb.debian.org/debian stable main
answered Mar 21 at 23:11
äxläxl
213
213
add a comment |
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f504734%2fdisable-apt-upgrades-globally%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Do you still want to be able to install packages with
apt install
?– Stephen Kitt
Mar 6 at 16:41
no it is a completely static EC2 instance that I spin up periodically; I do not ever want to run
apt-anything
– pkaramol
Mar 6 at 16:47