On a fresh install of Zorin OS, ran my unsnapping-script, and now I am unable to install packages that should be in the main repos

I just installed a fresh install of Zorin OS Core (latest) and ran this script to remove snap

#!/bin/sh

sudo apt purge snapd -y # Completely rids snapd from the system
sudo rm -rf ~/snap /snap /var/snap /var/lib/snapd # Deletes all snap directories

sudo apt autoremove -y

sudo apt update # Updates package lists

Before manually creating nosnap.pref in /etc/apt/preferences.d/ containing the lines

Package: snapd
Pin: release a=*
Pin-Priority: -10  

After I had finished running this script, I ran sudo apt update and sudo apt upgrade to a completely normal output.

However, when I try to install packages that should be in the main/default repositories, this happens.

zorin@zorin:~$ sudo apt install neofetch Reading package lists... Done Building dependency tree
Reading state information... Done E: Unable to locate package neofetch

zorin@zorin:~$ sudo apt install net-tools
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package net-tools is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'net-tools' has no installation candidate

I am also unable to use commands that should be installed, such as locate

zorin@zorin:~$ locate nosnap.pref
locate: command not found

Installing mlocate leads to the same output as installing net-tools.

So far I've tried:

  • Reinstalling snapd to see if it changes the output
  • Running sudo apt update with and without --fix-missing and --fix-broken

Is there any help? Is there any repos I simply haven't added, or have I managed to partly brick my install?|

Any and all help is appreciated!

I routinely remove snapd and flatpak when fresh installing Zorin. I do not believe that should brick your system.
Can you open Software & Updates and ensure the Top Four Options are checked on the first tab and that your "Download from" drop down menu is set to Main Server?
If the above was not done, please set it up as above, then run

sudo apt update && sudo apt upgrade

Then try installing neofetch again...

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.