In Debian, the list of repositories from which you can install software is specified in the file /etc/apt/sources.list
and in additional .list
files in the directory /etc/apt/sources.list.d/
. If your system is asking for a CD-ROM source, it's likely because there's a line in your sources.list
file or in a file in sources.list.d
that specifies a CD-ROM source.
Here's how you can remove the CD-ROM source:
Backup the current sources.list file: Before editing the
sources.list
file, it's a good idea to make a backup of it in case something goes wrong.sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup
Edit the sources.list file: Open the
sources.list
file in a text editor with root privileges, such asnano
orvi
.sudo nano /etc/apt/sources.list
Comment or remove the CD-ROM line: Look for a line that starts with
deb cdrom:
. Comment it out by placing a#
at the beginning of the line, or remove the line entirely.# deb cdrom:[Debian GNU/Linux ...]
Save and close the file: If you used
nano
, you can save changes by pressingCtrl + O
, then pressEnter
, and exit by pressingCtrl + X
.Update the package database: Finally, update the package database to reflect the changes to the
sources.list
file.sudo apt-get update
This should stop your system from asking for the CD-ROM when installing software or updating the package database.
Adam Malin
You can find me on Twitter or on Nostr at
npub15jnttpymeytm80hatjqcvhhqhzrhx6gxp8pq0wn93rhnu8s9h9dsha32lx
You can view and write comments on this or any other post by using the Satcom browser extention.
value4value Did you find any value from this article? Click here to send me a tip!