Score:0

How do I fix my machine after purging ca-certificates?

sx flag

I have done a very silly thing by running the following command.

sudo apt-get purge postfix mailutils libsasl2-2 ca-certificates libsasl2-modules

This has left my machine without a network connection of any kind and without access to peripherals.

When I power up I get put into a TTY session. From here I have tried apt to reinstall the packages but can't because I have no access to the web or an external drive.

Is there a way around this?

pl flag
Can you download the debs manually on another computer, transfer via USB and install them?
Argentum avatar
sx flag
Sadly not. I've tried. But purging the certificates seems to have blocked all peripherals including USB sticks.
pl flag
I suspect the USB stick does work, but doesn't automount without the help of the desktop environment helping you. It's likely possible to mount it manually. If you plug a stick in and then run `lsblk`, you'll probably see the device show up as something like `/dev/sdb1` or similar. You may be able to manually mount it with `mkdir ~/usb` then `sudo mount /dev/sdb1 ~/usb`. Making sure to get the device name right
Argentum avatar
sx flag
Aha! Yes, that works. Thank you! But my next question is, what should I copy accross? I've tried copying `/etc/ssl/certs/ca-certificates.crt` but that doesn't do the job.
Argentum avatar
sx flag
When I look at `/var/log/apt/history.log` I see the result of my purge command. `Purge: kerneloops:amd64 (0.12+git20140509-6ubuntu5), python3-nbclient:and64 (0.5.6-2) ...` The list is long and all entries end `amd64`.
pl flag
I would go to packages.ubuntu.com and search for the packages - there's filters for releases, or you can just put the package name in the url like packages.ubuntu.com/ca-certificates and then download the amd64 deb from whichever mirror you like.
pl flag
Here, I made a quick video showing you how to find and download the debs. https://youtu.be/48iY1Po0uUw
Argentum avatar
sx flag
Oh my goodness! Thank you so much. That is far beyond the call of duty. I'm now back into my system. Data is safe and I'm a happy man. I have have some missing apps but I'm sure I can sort those out myself. I really can't thank you enough @popey.
pl flag
Yay! Happy days, I'll turn my comments into an answer so it's easier to find. Have a great weekend.
Score:0
pl flag

On another computer, I would go to packages.ubuntu.com and search for the packages - there's filters for releases, or you can just put the package name in the url like packages.ubuntu.com/ca-certificates and then download the amd64 deb from whichever mirror you like.

Once you have downloaded them all, put them on a USB stick, and take that to the broken computer. If you're stuck in a TTY it might not automount the USB stick. All is not lost, however.

If you plug a stick in and then run lsblk, you'll probably see the device show up as something like /dev/sdb1 or similar. You may be able to manually mount it with mkdir ~/usb then sudo mount /dev/sdb1 ~/usb. Making sure to get the device name right

I made a quick video showing you how to find and download the debs. https://youtu.be/48iY1Po0uUw

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.