There is another, self-answered, question with this title but there are several differences and the answers there did not work for me. My host is Debian 9, and so is my guest. I am not running a live-cd in the guest. My aim is to enable copy-paste between host and guest.

The sources.list in my guest contains:

deb http://deb.debian.org/debian/ stretch main contrib
deb http://deb.debian.org/debian/ stretch-backports main contrib
deb http://deb.debian.org/debian/ stretch-updates main contrib non-free
deb http://security.debian.org/debian-security/ stretch main contrib non-free
deb cdrom:[Debian GNU/Linux 9.9.0 _Stretch_ - Official amd64 DVD Binary-1 20190427-10:30]/ stretch contrib main

I have done the usual "apt update", etc. I would expect this to be as simple as referencing the correct repository but I have found nothing to indicate what that might be if it is not one of the ones already listed.

  • What happens when you run apt install spice-vdagent? Your repositories look OK (minus the copy-paste line ending problems). Commented Jul 2, 2019 at 15:10
  • What happens is exactly contained in the title of my post here: "Unable to locate package spice-vdagent".
    – user31404
    Commented Jul 2, 2019 at 15:16
  • What does apt policy spice-vdagent output? (Presumably the same thing...) Are there any errors when you run apt update? Commented Jul 2, 2019 at 15:18
  • Yup, same output. Only errors are the complaint that apt update cannot be used to add a new CD-ROM, that the CD can't be updated from securely and has been disabled. If I comment out the CD reference in sources.list I see no error messages. AHA! But now apt apparently finds spice-vdagent, although it says it is disabled or static and is not starting it. I suppose I should not be surprised that apt being unhappy with the CD caused it to skip all the other repositories. Thanks! Now I just have to get it running, which may be as simple as restarting the guest...or not, but first problem solved.
    – user31404
    Commented Jul 2, 2019 at 15:26
  • Thanks - so this turned out to be a misunderstanding of how apt behaves when it encounters something it does not like. copy-paste is now working as hoped. Stephen, If you can formulate your comments etc into an answer I can credit you for your help.
    – user31404
    Commented Jul 2, 2019 at 15:32

1 Answer 1


Your repositories appear to be set up correctly (barring the non-free variations, but they don’t matter here), and spice-vdagent is indeed available in Debian 9.9.

Based on your analysis of the apt update errors, it turns out that disabling the CD-ROM entry allows apt to update the remote repositories and then find and install spice-vdagent.

You must log in to answer this question.