0

I followed a suggestion and bricked my server. I no longer have apt / apt-get after installing apt-transport-https and I regret it.

I tried installing apt via dpkg but it errors out with:

dpkg: regarding apt_1.8.2.1_amd64.deb containing apt:
 apt breaks apt-transport-https (<< 1.5~alpha4~)
  apt-transport-https (version 1.4.10) is present and installed.

dpkg: error processing archive apt_1.8.2.1_amd64.deb (--install):
 installing apt would break apt-transport-https, and
 deconfiguration is not permitted (--auto-deconfigure might help)
Errors were encountered while processing:
 apt_1.8.2.1_amd64.deb

how do I uninstall apt-transport-https and revert back?

Romeo Mihalcea
  • 522
  • 1
  • 9
  • 27
  • It's debian 10 . – Romeo Mihalcea Sep 30 '20 at 21:07
  • apt-transport-https isn't supposed to be installed on Debian 10+. the apt/apt-get packages had native support for the https transport. If you tried to force the installation of older/newer version you probably have seriously broken something, at that point, it almost be easier to just format+reinstall. – Zoredache Sep 30 '20 at 21:31
  • format+reinstall will bring a big downtime to my server. Did I really broke it so bad that it's unrecoverable? – Romeo Mihalcea Sep 30 '20 at 21:38
  • how do you remove `apt-transport-https` when you have no `apt` which was removed by `apt-transport-https` :)) – Romeo Mihalcea Oct 01 '20 at 12:32

1 Answers1

0

The version of apt-transport-https you have installed came from Debian 9, and the version of apt you propose to install is from Debian 11. Neither is appropriate for your Debian 10 system. apt-transport-https was deprecated in Debian 10 as its functionality is now included directly in apt.

You both need to remove apt-transport-https and get the correct version of apt for Debian 10.


You said that dpkg still works, so you should be able to use it to remove apt-transport-https. For example:

dpkg --purge apt-transport-https

After that you should be able to reinstall the correct apt package downloaded from debian.org as shown above.

dpkg --install apt_1.8.2.1_amd64.deb

Note that if you also deleted any of its dependencies, you will need to locate and install those first. An error message will tell you if this is necessary.

Michael Hampton
  • 244,070
  • 43
  • 506
  • 972