0

I've done some things with apt-get remove and apt-get install, and one of the actions must have broken something on my Ubuntu 18.04 server

I'm wondering if someone has an idea as to how I would reverse/undo those changes, I can't boot into Ubuntu itself and can only boot into rescue mode

I've tried looking in the /var/log/apt/history.log file to check the apt-get history, but it doesn't exist in rescue mode

I need an alternative to just backing up data, as my internet is pretty slow and I don't want anything possibly getting corrupted if I timeout or having to start all over again

  • 1
    install and remove are designed to be "idempotent", meaning that install foo followed by remove foo will leave your system in exactly the same state that it was in before you started. There are two exceptions: Data files in /home and config files in /etc are not removed by remove...but those should both be inert anyway. We can offer you more specific advice if you edit your question to provide more specifics on your problem. – user535733 Jul 14 '20 at 20:15
  • 1
    All log files continue to exist regardless of whether you are in Rescue Mode or any other mode. Perhaps you are encountering a symptom? – user535733 Jul 14 '20 at 20:17
  • I haven't only run apt-get install foo and apt-get remove foo I've installed different components and removed other components, mostly python components if I remember correctly, which leads me to think maybe I messed something up with python that won't let me login via SSH properly – Jakaboii Jul 14 '20 at 20:30
  • Some folks here are VERY good at troubleshooting ssh login problems. Why not ask about that instead? – user535733 Jul 14 '20 at 20:33
  • Well its not like I've forgotten a password or something, I'm pretty sure me messing with python by uninstalling version 3.6 and installing version 3.8 broke it I know this sounds dumb, but any time I installed the latest version, it output that I was using 3.6 when I just installed 3.8.3 So me being me, I uninstalled python3.6 hoping that would help, but it just led to these issues While logging in though, it says ssh: connect to host x port 22: Connection timed out – Jakaboii Jul 14 '20 at 20:41
  • Are your problems occurring on the SSH client or on the SSH server? Replacing the installed version of Python often breaks the system and ends badly, so we recommend against doing that. There are ways to use Py3.8 without uninstalling 3.6. One way or another, you must restore 3.6. – user535733 Jul 14 '20 at 21:33
  • Yes, I figured that. But I've no idea how to do so in rescue mode, I've already tried installing it but I still can't get into the VPS. I've no idea if it starts properly as with the host all I see is Online and Offline – Jakaboii Jul 14 '20 at 23:19
  • This seems like two different problems, but a combination of this answer about fixing Ubuntu from recovery mode and this answer about using pyenv to manage non-system Python installations and keep from breaking the system (which I should also use, so thank you). Edit, for clarity -- replace "ubuntu-desktop" with "python3.6" in the recovery mode fixing. – l3l_aze Jul 15 '20 at 02:44
  • When doing apt-get install --reinstall python3.6, I get an output saying the package doesn't exist – Jakaboii Jul 15 '20 at 16:25
  • I've ran all the commands listed in that question, and I still cannot get into the VPS – Jakaboii Jul 15 '20 at 16:53

0 Answers0