How to enable or disable -updates, -security, -backports, -proposed repositories from commandline?











up vote
4
down vote

favorite
1












Let's assume that we are using Ubuntu 18.04 LTS (Bionic Beaver).



I know GUI ways to enable or disable the following repositories:





  1. Important security updates (bionic-security)


  2. Recommended updates (bionic-updates)


  3. Pre-released updates (bionic-proposed)


  4. Unsupported updates (bionic-backports)


In KDE user may want to open Software & Updates (or software-properties-kde) and navigate to Updates tab.

In GNOME, MATE, Xfce user should open Software & Updates (or software-properties-gtk) and navigate to Updates tab for -security, -updates and -backports and Developer options tab for -proposed.



But how to enable or disable -updates, -security, -backports, -proposed repositories from commandline?



Note: I need a solution without direct editing of /etc/apt/sources.list.



Update: I created discussion and poll named "Does Ubuntu need console alternative for software-properties-gtk / software-properties-kde?" on community.ubuntu.com.










share|improve this question

















This question has an open bounty worth +50
reputation from N0rbert ending in 5 days.


This question has not received enough attention.
















  • In Kubuntu 18.04, software-properties-kde has NoDisplay=true and so won't be seen normally. Now one has to open Discover then click on Settings and then on ☰ in order to access the GUI of software-properties-kde. The other option (which I've taken) is to copy software-properties-kde.desktop to ~/.local/share/applications and comment out NoDisplay=true.
    – DK Bose
    Nov 16 at 12:07












  • Is this a one-time disable, or do you want to be able to switch them on/off regularly? One ongoing solution is to disable /etc/apt/sources.list entirely by replacing it with a dummy file, then programmatically creating/deleting individual files in /etc/apt/sources.list.d. Rather like applications can insert/remove files in cron.daily. Another solution is to create a series of source files in different permutations, and select the correct file using apt-config. I don't think apt-config permits you to drop sources after they have been loaded.
    – user535733
    Nov 16 at 14:42










  • @user535733 I wanted to have simple toggle like add-apt-repository / add-apt-repository -r does for PPAs. The apt-config idea sounds interesting.
    – N0rbert
    Nov 16 at 19:33












  • So, are you wanting a script or tool that modifies sources.list or do you just not want to touch that file at all? I'm pretty sure enabling/disabling those items in the software GUI just removes / adds those items, not sure how you would do it any other way. A script to add/remove each of those items is fairly trivial.
    – Zzzach...
    5 hours ago















up vote
4
down vote

favorite
1












Let's assume that we are using Ubuntu 18.04 LTS (Bionic Beaver).



I know GUI ways to enable or disable the following repositories:





  1. Important security updates (bionic-security)


  2. Recommended updates (bionic-updates)


  3. Pre-released updates (bionic-proposed)


  4. Unsupported updates (bionic-backports)


In KDE user may want to open Software & Updates (or software-properties-kde) and navigate to Updates tab.

In GNOME, MATE, Xfce user should open Software & Updates (or software-properties-gtk) and navigate to Updates tab for -security, -updates and -backports and Developer options tab for -proposed.



But how to enable or disable -updates, -security, -backports, -proposed repositories from commandline?



Note: I need a solution without direct editing of /etc/apt/sources.list.



Update: I created discussion and poll named "Does Ubuntu need console alternative for software-properties-gtk / software-properties-kde?" on community.ubuntu.com.










share|improve this question

















This question has an open bounty worth +50
reputation from N0rbert ending in 5 days.


This question has not received enough attention.
















  • In Kubuntu 18.04, software-properties-kde has NoDisplay=true and so won't be seen normally. Now one has to open Discover then click on Settings and then on ☰ in order to access the GUI of software-properties-kde. The other option (which I've taken) is to copy software-properties-kde.desktop to ~/.local/share/applications and comment out NoDisplay=true.
    – DK Bose
    Nov 16 at 12:07












  • Is this a one-time disable, or do you want to be able to switch them on/off regularly? One ongoing solution is to disable /etc/apt/sources.list entirely by replacing it with a dummy file, then programmatically creating/deleting individual files in /etc/apt/sources.list.d. Rather like applications can insert/remove files in cron.daily. Another solution is to create a series of source files in different permutations, and select the correct file using apt-config. I don't think apt-config permits you to drop sources after they have been loaded.
    – user535733
    Nov 16 at 14:42










  • @user535733 I wanted to have simple toggle like add-apt-repository / add-apt-repository -r does for PPAs. The apt-config idea sounds interesting.
    – N0rbert
    Nov 16 at 19:33












  • So, are you wanting a script or tool that modifies sources.list or do you just not want to touch that file at all? I'm pretty sure enabling/disabling those items in the software GUI just removes / adds those items, not sure how you would do it any other way. A script to add/remove each of those items is fairly trivial.
    – Zzzach...
    5 hours ago













up vote
4
down vote

favorite
1









up vote
4
down vote

favorite
1






1





Let's assume that we are using Ubuntu 18.04 LTS (Bionic Beaver).



I know GUI ways to enable or disable the following repositories:





  1. Important security updates (bionic-security)


  2. Recommended updates (bionic-updates)


  3. Pre-released updates (bionic-proposed)


  4. Unsupported updates (bionic-backports)


In KDE user may want to open Software & Updates (or software-properties-kde) and navigate to Updates tab.

In GNOME, MATE, Xfce user should open Software & Updates (or software-properties-gtk) and navigate to Updates tab for -security, -updates and -backports and Developer options tab for -proposed.



But how to enable or disable -updates, -security, -backports, -proposed repositories from commandline?



Note: I need a solution without direct editing of /etc/apt/sources.list.



Update: I created discussion and poll named "Does Ubuntu need console alternative for software-properties-gtk / software-properties-kde?" on community.ubuntu.com.










share|improve this question















Let's assume that we are using Ubuntu 18.04 LTS (Bionic Beaver).



I know GUI ways to enable or disable the following repositories:





  1. Important security updates (bionic-security)


  2. Recommended updates (bionic-updates)


  3. Pre-released updates (bionic-proposed)


  4. Unsupported updates (bionic-backports)


In KDE user may want to open Software & Updates (or software-properties-kde) and navigate to Updates tab.

In GNOME, MATE, Xfce user should open Software & Updates (or software-properties-gtk) and navigate to Updates tab for -security, -updates and -backports and Developer options tab for -proposed.



But how to enable or disable -updates, -security, -backports, -proposed repositories from commandline?



Note: I need a solution without direct editing of /etc/apt/sources.list.



Update: I created discussion and poll named "Does Ubuntu need console alternative for software-properties-gtk / software-properties-kde?" on community.ubuntu.com.







command-line apt package-management updates update-manager






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 22 at 16:38

























asked Nov 16 at 11:59









N0rbert

19.5k54390




19.5k54390






This question has an open bounty worth +50
reputation from N0rbert ending in 5 days.


This question has not received enough attention.








This question has an open bounty worth +50
reputation from N0rbert ending in 5 days.


This question has not received enough attention.














  • In Kubuntu 18.04, software-properties-kde has NoDisplay=true and so won't be seen normally. Now one has to open Discover then click on Settings and then on ☰ in order to access the GUI of software-properties-kde. The other option (which I've taken) is to copy software-properties-kde.desktop to ~/.local/share/applications and comment out NoDisplay=true.
    – DK Bose
    Nov 16 at 12:07












  • Is this a one-time disable, or do you want to be able to switch them on/off regularly? One ongoing solution is to disable /etc/apt/sources.list entirely by replacing it with a dummy file, then programmatically creating/deleting individual files in /etc/apt/sources.list.d. Rather like applications can insert/remove files in cron.daily. Another solution is to create a series of source files in different permutations, and select the correct file using apt-config. I don't think apt-config permits you to drop sources after they have been loaded.
    – user535733
    Nov 16 at 14:42










  • @user535733 I wanted to have simple toggle like add-apt-repository / add-apt-repository -r does for PPAs. The apt-config idea sounds interesting.
    – N0rbert
    Nov 16 at 19:33












  • So, are you wanting a script or tool that modifies sources.list or do you just not want to touch that file at all? I'm pretty sure enabling/disabling those items in the software GUI just removes / adds those items, not sure how you would do it any other way. A script to add/remove each of those items is fairly trivial.
    – Zzzach...
    5 hours ago


















  • In Kubuntu 18.04, software-properties-kde has NoDisplay=true and so won't be seen normally. Now one has to open Discover then click on Settings and then on ☰ in order to access the GUI of software-properties-kde. The other option (which I've taken) is to copy software-properties-kde.desktop to ~/.local/share/applications and comment out NoDisplay=true.
    – DK Bose
    Nov 16 at 12:07












  • Is this a one-time disable, or do you want to be able to switch them on/off regularly? One ongoing solution is to disable /etc/apt/sources.list entirely by replacing it with a dummy file, then programmatically creating/deleting individual files in /etc/apt/sources.list.d. Rather like applications can insert/remove files in cron.daily. Another solution is to create a series of source files in different permutations, and select the correct file using apt-config. I don't think apt-config permits you to drop sources after they have been loaded.
    – user535733
    Nov 16 at 14:42










  • @user535733 I wanted to have simple toggle like add-apt-repository / add-apt-repository -r does for PPAs. The apt-config idea sounds interesting.
    – N0rbert
    Nov 16 at 19:33












  • So, are you wanting a script or tool that modifies sources.list or do you just not want to touch that file at all? I'm pretty sure enabling/disabling those items in the software GUI just removes / adds those items, not sure how you would do it any other way. A script to add/remove each of those items is fairly trivial.
    – Zzzach...
    5 hours ago
















In Kubuntu 18.04, software-properties-kde has NoDisplay=true and so won't be seen normally. Now one has to open Discover then click on Settings and then on ☰ in order to access the GUI of software-properties-kde. The other option (which I've taken) is to copy software-properties-kde.desktop to ~/.local/share/applications and comment out NoDisplay=true.
– DK Bose
Nov 16 at 12:07






In Kubuntu 18.04, software-properties-kde has NoDisplay=true and so won't be seen normally. Now one has to open Discover then click on Settings and then on ☰ in order to access the GUI of software-properties-kde. The other option (which I've taken) is to copy software-properties-kde.desktop to ~/.local/share/applications and comment out NoDisplay=true.
– DK Bose
Nov 16 at 12:07














Is this a one-time disable, or do you want to be able to switch them on/off regularly? One ongoing solution is to disable /etc/apt/sources.list entirely by replacing it with a dummy file, then programmatically creating/deleting individual files in /etc/apt/sources.list.d. Rather like applications can insert/remove files in cron.daily. Another solution is to create a series of source files in different permutations, and select the correct file using apt-config. I don't think apt-config permits you to drop sources after they have been loaded.
– user535733
Nov 16 at 14:42




Is this a one-time disable, or do you want to be able to switch them on/off regularly? One ongoing solution is to disable /etc/apt/sources.list entirely by replacing it with a dummy file, then programmatically creating/deleting individual files in /etc/apt/sources.list.d. Rather like applications can insert/remove files in cron.daily. Another solution is to create a series of source files in different permutations, and select the correct file using apt-config. I don't think apt-config permits you to drop sources after they have been loaded.
– user535733
Nov 16 at 14:42












@user535733 I wanted to have simple toggle like add-apt-repository / add-apt-repository -r does for PPAs. The apt-config idea sounds interesting.
– N0rbert
Nov 16 at 19:33






@user535733 I wanted to have simple toggle like add-apt-repository / add-apt-repository -r does for PPAs. The apt-config idea sounds interesting.
– N0rbert
Nov 16 at 19:33














So, are you wanting a script or tool that modifies sources.list or do you just not want to touch that file at all? I'm pretty sure enabling/disabling those items in the software GUI just removes / adds those items, not sure how you would do it any other way. A script to add/remove each of those items is fairly trivial.
– Zzzach...
5 hours ago




So, are you wanting a script or tool that modifies sources.list or do you just not want to touch that file at all? I'm pretty sure enabling/disabling those items in the software GUI just removes / adds those items, not sure how you would do it any other way. A script to add/remove each of those items is fairly trivial.
– Zzzach...
5 hours ago















active

oldest

votes











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
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: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
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
});


}
});














 

draft saved


draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1093450%2fhow-to-enable-or-disable-updates-security-backports-proposed-repositories%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes
















 

draft saved


draft discarded



















































 


draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1093450%2fhow-to-enable-or-disable-updates-security-backports-proposed-repositories%23new-answer', 'question_page');
}
);

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







Popular posts from this blog

flock() on closed filehandle LOCK_FILE at /usr/bin/apt-mirror

Mangá

 ⁒  ․,‪⁊‑⁙ ⁖, ⁇‒※‌, †,⁖‗‌⁝    ‾‸⁘,‖⁔⁣,⁂‾
”‑,‥–,‬ ,⁀‹⁋‴⁑ ‒ ,‴⁋”‼ ⁨,‷⁔„ ‰′,‐‚ ‥‡‎“‷⁃⁨⁅⁣,⁔
⁇‘⁔⁡⁏⁌⁡‿‶‏⁨ ⁣⁕⁖⁨⁩⁥‽⁀  ‴‬⁜‟ ⁃‣‧⁕‮ …‍⁨‴ ⁩,⁚⁖‫ ,‵ ⁀,‮⁝‣‣ ⁑  ⁂– ․, ‾‽ ‏⁁“⁗‸ ‾… ‹‡⁌⁎‸‘ ‡⁏⁌‪ ‵⁛ ‎⁨ ―⁦⁤⁄⁕