{"id":1692,"date":"2021-12-16T13:04:05","date_gmt":"2021-12-16T10:04:05","guid":{"rendered":"https:\/\/files2.tojikon.net\/files-cloud\/2021\/02\/28\/how-to-remove-a-remove-apt-repository-from-debian\/https:\/\/files2.tojikon.net\/files-cloud\/2021\/02\/28\/how-to-remove-a-remove-apt-repository-from-debian\/"},"modified":"2021-12-16T13:04:05","modified_gmt":"2021-12-16T10:04:05","slug":"how-to-remove-a-remove-apt-repository-from-debian","status":"publish","type":"post","link":"https:\/\/tojikon.net\/en\/1692-how-to-remove-a-remove-apt-repository-from-debian\/","title":{"rendered":"How to remove a remove apt repository from Debian"},"content":{"rendered":"<section id=\"related_posts\">\n<div class=\"block-head\">\n<h3>Related Articles<\/h3>\n<\/div>\n<\/section>\n<p>Do you have an Apt repository on your Debian Linux PC that you want to delete? Can\u2019t figure out how to do it? We can help! Follow along as we go over two ways you can remove Apt repositories from Debian!<\/p>\n<h2>Remove apt repository \u2013 Text editor<\/h2>\n<p>The easiest way to remove an Apt software repository from Debian Linux is through a text editor. Why? You can easily open up your Debian Apt sources list file in a text editor tool and turn things on and off without a lot of trouble.\u00a0<\/p>\n<p>To get started, open up a terminal window. A terminal window is required for editing software sources on Debian, as they are system files. Users aren\u2019t able to edit these system files without elevated privileges.\u00a0<\/p>\n<p>Open up a terminal window on your Debian Linux desktop by pressing\u00a0<strong>Ctrl + Alt + T\u00a0<\/strong>on the keyboard. Or, search for \u201cTerminal\u201d in the app menu on your computer to launch the app. Once the terminal window is open, use the\u00a0<strong>su \u2013\u00a0<\/strong>command to log into the root account.<\/p>\n<p>Note: if you have sudo set up on your Debian Linux PC, you can execute\u00a0<strong>sudo -s\u00a0<\/strong>to gain root terminal access rather than using the\u00a0<strong>su\u00a0<\/strong>command.<\/p>\n<pre>\nsu -\n<\/pre>\n<p>Once the terminal session has root access, we can open up the \/etc\/apt\/sources.list file for editing purposes. In this guide, we\u2019ll make use of the Nano text editor. Nano is highly user-friendly, pre-installed on most Debian Linux systems, and works right in the terminal.<\/p>\n<pre>\nnano \/etc\/apt\/sources.list\n<\/pre>\n<p>Inside the Nano text editor, look for the software repository you wish to disable. In this example, we are disabling the VirtualBox third-party Apt repository. Once you\u2019ve found the repo, place a <strong>#<\/strong> symbol in front of it.<\/p>\n<p>By placing a <strong>#<\/strong> symbol in front of the repository, you are turning it off. Debian will ignore this repository, as any line with the <strong>#<\/strong> symbol is a code comment.\u00a0<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone wp-image-396200 size-full\" src=\"https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/how-to-remove-a-remove-apt-repository-from-debian.png\" alt=\"\" width=\"1200\" height=\"564\"\/><\/p>\n<p>Once you\u2019ve added the <strong>#<\/strong> symbol in front of the repo, press the\u00a0<strong>Ctrl + O\u00a0<\/strong>key on the keyboard to save your changes. After that, exit Nano by pressing the\u00a0<strong>Ctrl + X\u00a0<\/strong>key.<\/p>\n<p>When you\u2019ve exited the Nano text editor, you can execute the\u00a0<strong>apt update\u00a0<\/strong>command to refresh Debian\u2019s software sources. Debian will exclude the repo you turned off from the update, thus disabling it.<\/p>\n<pre>\nsudo apt update\n<\/pre>\n<h3>Remove repo for good<\/h3>\n<p>If you want to remove an Apt repository from Debian for good, adding a # symbol in front to turn it off isn\u2019t enough. To remove it altogether, do the following.<\/p>\n<p>First, open up your \/etc\/apt\/sources.list file in the Nano text editor with the command below.<\/p>\n<pre>\nsu -\nnano -w \/etc\/apt\/sources.list\n<\/pre>\n<p>Inside the Nano text editor, locate the repo you wish to remove. Then, erase the repo line from the file by using the <strong>Backspace\u00a0<\/strong>key. When the entire repo line is removed, press\u00a0<strong>Ctrl + O\u00a0<\/strong>to save the edits and <strong>Ctrl + X\u00a0<\/strong>to exit Nano.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone wp-image-396192 size-full\" src=\"https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/how-to-remove-a-remove-apt-repository-from-debian-1.png\" alt=\"\" width=\"1200\" height=\"657\"\/><\/p>\n<p>Once out of Nano, run the\u00a0<strong>apt update\u00a0<\/strong>command to refresh your Debian sources. By updating, Debian will exclude the now removed repo.<\/p>\n<pre>\nsudo apt update\n<\/pre>\n<h2>Remove apt repository \u2013 Synaptic Package Manager<\/h2>\n<p>If removing Apt repositories via the terminal window isn\u2019t your thing, you\u2019ll be happy to know that it is possible to remove repos via the Synaptic package manager tool on Debian.<\/p>\n<p>The Synaptic package manager tool comes pre-installed on most installations of Debian Linux. However, if you do not have this app installed, open up a terminal window and use the command below to get the app working on your system.<\/p>\n<pre>\nsudo apt install synaptic\n<\/pre>\n<p>To remove Apt repositories from your Debian Linux PC via Synaptic package manager, do the following. First, open the app and enter your user account password.\u00a0<\/p>\n<p>Once the app is open on the desktop, look for the \u201cSettings\u201d button at the top of the page, and click on it with the mouse. Inside the \u201cSettings\u201d menu, there are several options to choose from. Select the \u201cRepositories\u201d button.<\/p>\n<p>After clicking on the \u201cRepositories\u201d button with the mouse, the \u201cSoftware &amp; Updates\u201d window will open on the Debian desktop. From here, click on the \u201cSoftware &amp; Updates\u201d window with the mouse, and select \u201cOther Software.\u201d<\/p>\n<p>In the \u201cOther Software\u201d tab, you\u2019ll see software repositories available on your Debian Linux system. Look through the list for the one you wish to remove from your system.<\/p>\n<p>Once you\u2019ve found the Apt repository you wish to remove from Debian, select it with the mouse. Then, find the \u201cRemove\u201d button in the \u201cOther Software\u201d window and click on it to delete the repo from Debian for good.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone wp-image-396199 size-full\" src=\"https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/how-to-remove-a-remove-apt-repository-from-debian-3.png\" alt=\"\" width=\"1200\" height=\"591\"\/><\/p>\n<p>When you\u2019ve deleted your software repo, click the \u201cClose\u201d button. After selecting the \u201cClose\u201d button with the mouse, the Software &amp; Updates app will ask you to reload your software sources. Allow it to do so to complete the removal of the Apt repository from your system.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Related Articles Do you have an Apt repository on your Debian Linux PC that you want to delete? Can\u2019t figure out how to do it? We can help! Follow along as we go over two ways you can remove Apt repositories from Debian! Remove apt repository \u2013 Text editor The easiest way to remove an &hellip;<\/p>\n","protected":false},"author":1,"featured_media":1693,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[21],"tags":[33],"_links":{"self":[{"href":"https:\/\/tojikon.net\/en\/wp-json\/wp\/v2\/posts\/1692"}],"collection":[{"href":"https:\/\/tojikon.net\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tojikon.net\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tojikon.net\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tojikon.net\/en\/wp-json\/wp\/v2\/comments?post=1692"}],"version-history":[{"count":0,"href":"https:\/\/tojikon.net\/en\/wp-json\/wp\/v2\/posts\/1692\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/tojikon.net\/en\/wp-json\/wp\/v2\/media\/1693"}],"wp:attachment":[{"href":"https:\/\/tojikon.net\/en\/wp-json\/wp\/v2\/media?parent=1692"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tojikon.net\/en\/wp-json\/wp\/v2\/categories?post=1692"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tojikon.net\/en\/wp-json\/wp\/v2\/tags?post=1692"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}