2

I'm running Debian bullseye and wanted to install KeepassXC. I tried running sudo apt install keepassxc but it turns out keepassxc is not apart of the bullseye release. I added a line for a sid mirror to /etc/apt/sources.list and then ran sudo apt update. After realizing that this was probably a bad idea, I did a keyboard interrupt (Ctrl-C) as the update was running. It was running for a while at that point and even had requested 2 restarts of programs. I then commented out the line in the sources.list file and ran sudo apt update again, the output of which said there were no updates. I then ran a sudo apt autoremove, which removed 3 packages.

Has my dependency tree been irrevocably messed up? If I run a sudo apt upgrade, would this pull in changes from the sid release? I don't totally understand the difference between update and upgrade, so this could be a non-issue.

Any help would be greatly appreciated. Thanks!

Edit:

Output of apt policy:

Package files: 100 /var/lib/dpkg/status release a=now 500 http://httpredir.debian.org/debian stretch/non-free amd64 Packages release v=9.13,o=Debian,a=oldstable,n=stretch,l=Debian,c=non-free,b=amd64 origin httpredir.debian.org 500 http://httpredir.debian.org/debian stretch/contrib amd64 Packages release v=9.13,o=Debian,a=oldstable,n=stretch,l=Debian,c=contrib,b=amd64 origin httpredir.debian.org 500 http://httpredir.debian.org/debian stretch/main amd64 Packages release v=9.13,o=Debian,a=oldstable,n=stretch,l=Debian,c=main,b=amd64 origin httpredir.debian.org 500 http://security.debian.org/debian-security stretch/updates/main amd64 Packages release v=9,o=Debian,a=oldstable,n=stretch,l=Debian-Security,c=main,b=amd64 origin security.debian.org 500 http://mirrors.ocf.berkeley.edu/debian stretch/main amd64 Packages release v=9.13,o=Debian,a=oldstable,n=stretch,l=Debian,c=main,b=amd64 origin mirrors.ocf.berkeley.edu Pinned packages:

0

1 Answer 1

1

I’m somewhat surprised that apt update would request “2 restarts of programs”.

apt update retrieves the repository information for all the repositories configured in /etc/apt/sources.list and files in /etc/apt/sources.list.d. It doesn’t cause any packages to be upgraded, or anything to be restarted or ask to be restarted.

apt upgrade upgrades the system’s installed packages so that they match the latest available versions, adjusted according to “pin priorities” if necessary (and the default release, if configured, which is a sort of pin priority).

So apt update on its own, after adding entries for Sid, will only retrieve the repository information, it won’t upgrade anything to Sid. Removing the Sid entries and running apt update again will result in the Sid information being forgotten (or rather, no longer taken into account). A subsequent apt upgrade won’t know about packages (and versions) in Sid.

Your initial problem is surprising, since keepassxc is available in Bullseye and has been continuously ever since Bullseye has existed.

In summary: if you’ve restored your /etc/apt/sources.list configuration to its previous values and run apt update since then, nothing will have changed, and you should be able to install keepassxc without needing the Sid repositories.

As far as undoing an apt update command goes, you can’t ever fully undo it unless you have a backup of /var/lib/apt/lists, because the information from the repositories which are still configured has been updated. However, only the repositories which are still configured are ever taken into account.

11
  • Minor addendum: mixing sid and any stable release is extremely contraindicated and can lead to minor, major and possibly catastrophic dependency breakdowns. The OP got lucky if they only lost three packages.
    – Shadur
    Jul 5, 2021 at 7:32
  • @Shadur the OP are running Bullseye, so it’s not that bad; what’s more, nothing suggests that the three removed packages are related to the configuration change — it’s more likely they were already candidates for removal. Jul 5, 2021 at 7:43
  • Also, apt and dpkg are good at what they do, which is ensuring that dependency breakdowns don’t happen. Mixing releases does cause problems, but not “dependency breakdowns”. Jul 5, 2021 at 7:44
  • @StephenKitt unfortunately, I had run an sudo apt update, sudo apt upgrade, sudo apt autoremove cycle right before this whole exercise, so I'm fairly certain they weren't already candidates for removal, although they could have been.
    – tk30
    Jul 5, 2021 at 8:35
  • @StephenKitt As for the issue of keepassxc not being in bullseye-maybe I had misunderstood. The link provided on keepassxc's site links to sid, and sudo apt install keepassxc gives me Unable to locate package keepassxc. Your explanation of update vs upgrade is reassuring, but I don't know why the packages were marked for removal. I also don't know what was going on with the program restart request. At this point I'm thinking maybe just do a fresh debian install if I start running into issues since I just put debian on this computer. That does seem overkill to me though.
    – tk30
    Jul 5, 2021 at 8:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .