Skip to main content
further explain the difficulties
Source Link
usretc
  • 728
  • 6
  • 17

I have a bunch of packages "enhanced" by some Debian repository. Now I've disabled that repo from /etc/apt/sources.list.d and I want to re-install all packages that were "enhanced" to... whatever is available. I can get the list of packages just fine using grep, but

apt-get install --reinstall \ $(dpkg-query -Wf '${Version}\t${Package}\n' | grep SOMEREPO | awk '{print $2}' ) 

reports that those packages can't be downloaded. And of course they can't — not at their current version. --reinstall --downgrade is rejected by apt. It seems that the only way to downgrade is to name a specific version (which would require even more nasty scripting for a batch of packages).

Anything I'm overlooking? Maybe aptitude can do it?

Update: I know it can be done via pinning (thanks so much, mods!), but really, that's not a solution. It's laborious, and I don't care about which specific source the downgrade comes from. I want to downgrade to whatever is available from the currently-enabled sources.

Update 2: I'm using a Debian-derivative (MX Linux), so downgrades could come from

  • Debian buster
  • buster-backports
  • the distro-specific https://mirrors.*/mx/MX-Packages/mx/repo/

I have a bunch of packages "enhanced" by some Debian repository. Now I've disabled that repo from /etc/apt/sources.list.d and I want to re-install all packages that were "enhanced" to... whatever is available. I can get the list of packages just fine using grep, but

apt-get install --reinstall \ $(dpkg-query -Wf '${Version}\t${Package}\n' | grep SOMEREPO | awk '{print $2}' ) 

reports that those packages can't be downloaded. And of course they can't — not at their current version. --reinstall --downgrade is rejected by apt. It seems that the only way to downgrade is to name a specific version (which would require even more nasty scripting for a batch of packages).

Anything I'm overlooking? Maybe aptitude can do it?

Update: I know it can be done via pinning (thanks so much, mods!), but really, that's not a solution. It's laborious, and I don't care about which specific source the downgrade comes from. I want to downgrade to whatever is available from the currently-enabled sources.

I have a bunch of packages "enhanced" by some Debian repository. Now I've disabled that repo from /etc/apt/sources.list.d and I want to re-install all packages that were "enhanced" to... whatever is available. I can get the list of packages just fine using grep, but

apt-get install --reinstall \ $(dpkg-query -Wf '${Version}\t${Package}\n' | grep SOMEREPO | awk '{print $2}' ) 

reports that those packages can't be downloaded. And of course they can't — not at their current version. --reinstall --downgrade is rejected by apt. It seems that the only way to downgrade is to name a specific version (which would require even more nasty scripting for a batch of packages).

Anything I'm overlooking? Maybe aptitude can do it?

Update: I know it can be done via pinning (thanks so much, mods!), but really, that's not a solution. It's laborious, and I don't care about which specific source the downgrade comes from. I want to downgrade to whatever is available from the currently-enabled sources.

Update 2: I'm using a Debian-derivative (MX Linux), so downgrades could come from

  • Debian buster
  • buster-backports
  • the distro-specific https://mirrors.*/mx/MX-Packages/mx/repo/
Post Reopened by usretc, Stephen Kitt apt
clarify why overzealous close doesn't help at all
Added to review
Source Link
usretc
  • 728
  • 6
  • 17

I have a bunch of packages "enhanced" by some Debian repository. Now I've disabled that repo from /etc/apt/sources.list.d and I want to re-install all packages that were "enhanced" to... whatever is available. I can get the list of packages just fine using grep, but

apt-get install --reinstall \ $(dpkg-query -Wf '${Version}\t${Package}\n' | grep SOMEREPO | awk '{print $2}' ) 

reports that those packages can't be downloaded. And of course they can't — not at their current version. --reinstall --downgrade is rejected by apt. It seems that the only way to downgrade is to name a specific version (which would require even more nasty scripting for a batch of packages).

Anything I'm overlooking? Maybe aptitude can do it?

Update: I know it can be done via pinning (thanks so much, mods!), but really, that's not a solution. It's laborious, and I don't care about which specific source the downgrade comes from. I want to downgrade to whatever is available from the currently-enabled sources.

I have a bunch of packages "enhanced" by some Debian repository. Now I've disabled that repo from /etc/apt/sources.list.d and I want to re-install all packages that were "enhanced" to... whatever is available. I can get the list of packages just fine using grep, but

apt-get install --reinstall \ $(dpkg-query -Wf '${Version}\t${Package}\n' | grep SOMEREPO | awk '{print $2}' ) 

reports that those packages can't be downloaded. And of course they can't — not at their current version. --reinstall --downgrade is rejected by apt. It seems that the only way to downgrade is to name a specific version (which would require even more nasty scripting for a batch of packages).

Anything I'm overlooking? Maybe aptitude can do it?

I have a bunch of packages "enhanced" by some Debian repository. Now I've disabled that repo from /etc/apt/sources.list.d and I want to re-install all packages that were "enhanced" to... whatever is available. I can get the list of packages just fine using grep, but

apt-get install --reinstall \ $(dpkg-query -Wf '${Version}\t${Package}\n' | grep SOMEREPO | awk '{print $2}' ) 

reports that those packages can't be downloaded. And of course they can't — not at their current version. --reinstall --downgrade is rejected by apt. It seems that the only way to downgrade is to name a specific version (which would require even more nasty scripting for a batch of packages).

Anything I'm overlooking? Maybe aptitude can do it?

Update: I know it can be done via pinning (thanks so much, mods!), but really, that's not a solution. It's laborious, and I don't care about which specific source the downgrade comes from. I want to downgrade to whatever is available from the currently-enabled sources.

Post Closed as "Duplicate" by Stephen Kitt apt
Source Link
usretc
  • 728
  • 6
  • 17

Debian batch downgrade packages to whatever currently downloadable

I have a bunch of packages "enhanced" by some Debian repository. Now I've disabled that repo from /etc/apt/sources.list.d and I want to re-install all packages that were "enhanced" to... whatever is available. I can get the list of packages just fine using grep, but

apt-get install --reinstall \ $(dpkg-query -Wf '${Version}\t${Package}\n' | grep SOMEREPO | awk '{print $2}' ) 

reports that those packages can't be downloaded. And of course they can't — not at their current version. --reinstall --downgrade is rejected by apt. It seems that the only way to downgrade is to name a specific version (which would require even more nasty scripting for a batch of packages).

Anything I'm overlooking? Maybe aptitude can do it?