Clean up and refinement is an on going process for me. In my attempt to clean things up and simplify I have decided to remove snap/appimage. Now I know usually being strict on universal packages is silly, but hear me out.
I had no issues with snap at first. It seemed like a great idea and honestly I still think it is a great idea. App confinement and made modular enough where they can be universal to any normal Linux platform. Sounds great to me. Package management like apt should be for system level requirements and maybe developers, but apps should be controlled by the application developers themselves and maybe with an extra layer of security by running everything through a "app store", or something along those lines. It allows linux users to get the benefits of rapidly updating and a stable base. Really a dream if you ask me. I am the type of person that really just wants to get work done and stay updated on kernel and libraries I use as a developer. Sometimes when developing applications, or when you read the news you run into issues where you need the latest updates. Thankfully most applications now target Ubuntu, which is one of the reasons I have used it. I want the people that develop applications to support my platform. So now that you know a little about my motivations lets get into some silly, but what I think are signs of reasons why snap isn't developed for normal users and perhapes has been put together with a lack of care that I personally would want in my own project development. Ok so here are the silly reasons in a list.
1 2 3 4 |
|
Okay, so that is my silly list. Now let me elaborate and see if you agree, or disagree.
For number one, why is a snap directory in my home directory? Isn't this directory only for my personal files? Of course not talking about dot files. Isn't the purpose of the home folder so I can store my own personal files and back them up and maybe even put the directory on its own partition for backup and upgrading purposes? So why does it exist? Well you can read why it is done in this fashion on the bug report that has generated 811 "it affects me" clicks. BUG REPORT HERE - Essentially from reading the entire thing I have come to the conclusion that the developers of Snap either past or present, or whomever is in charge doesn't care about the standards, or even just logical sense. If you go to your home folder you have a clean structure. Things make logical sense right? You have Documents, Downloads, Music, Pictures, Public, Templates, Videos, and maybe more you have added yourself. Did you notice a pattern with these directories? They all start with a capital letter. They have a purpose and are something probably most every user of desktop linux will use. Now snap doesn't follow this standard. That is the first annoyance for me as some one who is trying to be organized and follow style guidelines for coding and many other developer centric ideals. This just annoys me. How any developer would do this to me speaks volumes about their personal ideals. I know that sounds really small, but if you are a developer and you don't follow standards like this. You clearly do not care. The other issues is the idea that a user will use this folder. I know confinement and the idea that this is where files will be stored as the snap "home" directory, but it just doesn't make sense in this fashion.
Now for number two, I let ubuntu decide the size of my root directory. I changed my swap size to 34 gigs to match my memory. Perhapes an old pratice, but it is a habit. Probably not required much any more with an nvme drive, but I am on the fence on this as I haven't bothered to look up what is the recommendation on this for more modern setups so I continue from my past readings. The issue arose when I was trying to remove my Chromium snap. For some reason during the removal it was trying to be helpful and save a revision of the snap for me or something. I didn't bother to look into this further because I couldn't comprehend why removing a snap would take up more space then just leaving it alone. I am guessing it has something to do with the directories of storage in either situation. My nvme drive is 1TB and my home directory takes the lions share. So that is my assumption. I eventually found a script created by popey on AskUbuntu and removed multiple revisions forcefully. This freed up some disk space and then I was able to remove Chromium. If you want to do this as well I will include more information below.
1 2 3 4 5 6 7 8 9 |
|
On to number three, okay so if you search online everyone knows snap is slow. I think appimage and flatpak is faster. I haven't tested this and don't take my experience on this solely, but from my personal experience even the simple Gnome Calculator app opens extremely slow as a snap. I can launch "heavier" flatpaks and appimages faster. That to me is strange. Now I am a little ignorant as to the decisions on how these programs were created, but a cursory look at the code may give us some insight. Lets dig in a little. Ok so here is the code base for snapd, https://git.launchpad.net/snapd/tree/ and here is the code base for flatpak https://github.com/flatpak/flatpak now I am not saying this means anythig as to why one is slower then the other, but one thing just jumps out at me. Flatpak looks to be written in C and Snap looks to be written in Go. I personally have no problem with either language, I like C style coding languages best as a personal preference, but I have messed with Go a little and have no issue with it, but I do believe C being extremely mature, like almost as mature as a language can be since it is one of the oldest is probably better optimized, has more resources, and people have used it forawhile so it just has more culture. Now that isn't to say Go is bad, again I don't know if this is really the reason why. It may be because Canonical decided to do some extra security and that is why the boot takes longer. If you know please let me know, but either way the choice of development language looks to me to be more aimed at faster developement over a long used and mature language that is used by the kernel team as well. Now I know many people love newer languages and I am not against them, but the older a language gets usually means the better it becomes. I am going to leave this issue as it is, but just from my own observations, it is slower than Flatpak and Appimage.
Onto the final issue, number four. Canonical has been an impressive company in many ways for Linux users. I think I would of personally still ended up using Linux without Canonical's involvement with Ubuntu, but I do appreciate all their work and ideas and Mr. Shuttleworth's investment and vision. Now here comes the bad part. For whatever reason it seems to me like every single project that Canonical tries to do fails except for one. Linux for Human Beings, this is the only project that has been a success. Now I don't have the metrics and all the financial details for the various projects. I could be wrong. I don't care enough to go and look honestly because I have kind of been disappointed honestly. Why you ask? I liked Unity. I liked the vision of convergence. I believed in those paths. I even donated to Ubuntu because I was so happy with the direction and the spirit of it. I go to meetups and I went to launch parties. In college I invested a small amount of time trying to improve some documentation and learn about contributing. My contributions are very small, but I am just trying to convey my love for the project. Now more bad news. It seems like all these projects are abandoned or failed. Is that Canonical's fault? Is it the communities? Is it neither? I don't know, but all I do know is that I am disappointed and I kind of don't believe Canonical can deliver. It feels like I bet on the wrong horse and it is letting me down in everything except of course changing desktop Linux, but that accomplishment happened awhile ago and now other providers are out shinning Canonical. PopOS from System76 is delivering and leading on Linux desktop. Some might say this isn't possible without Canonical and you might be right. This isn't the only example though. I don't want to beat Canonical up honestly. I want them to win and contribute great projects. I just do not have faith in their projects any more now that the Ubuntu TV failed, Ubuntu Phone failed, Unity failed, and what is next? Did I miss anything? I am glad they tried, but given the track record either they are bound to have another great project again, or they are finished. Their great project was in fact Linux for Human Beings and that will be the end of it. Is this bad? No not at all, but I guess I really don't want any new Canonical projects. Am I cynical?
So what if none of those things bother you and you some how stumbled onto this page because the snap folder bothered you. We have a solution. It is a relatively simple fix. Run this command and the folder is "hidden"
1 |
|
Credit https://askubuntu.com/a/882622/37577
Simple fix right? Still seems silly they made me do that.
If the other things aren't bothering you then that is it. You are a happy camper. If not the only choice I have to give you is simply move away from Snap. Go to Flatpak. Personally I like Appimages, but I don't like the idea that Appimages aren't fundamentally improving security on Linux. For example, why is it applications are for the most part trusted. I mean I know some things will require root privilages, but shouldn't we have tighter, simple, granular controls over system resources and be notified when an application is requesting access to those resources? I think yes, and if Linux is going to be something that works on all devices it is definately a direction we need to move in. Now I am not developing these solutions and I haven't read the vision statements or roadmaps. Maybe that isn't the ultimate goal. For me though that is the way things seem to be moving and I can now imagine that future. Anyway, here is how I removed Snap and installed Flatpak in Ubuntu 19.10.
First start by getting an idea of what snaps you have installed with this.
1 |
|
I think Canonical ships ubuntu with a few by default. Simply go through the list and remove them all except leave core because it won't let you uninstall that any way, but don't worry once you remove snapd it will be removed.
1 |
|
Now remove snapd.
1 |
|
Now remove the snap folder.
1 |
|
If you encounter an error run this.
1 |
|
Now if this hasn't happened already lets remove the gnome software center snap plugin.
1 |
|
Lets install Flatpak
1 |
|
Add the flatpak gnome software center plugin.
1 |
|
Add the flathub remove repository
1 |
|
And below are an example of possible common commands you can run to learn more, or add/update software.
1 2 3 4 5 6 7 |
|
Now that is it. Obviously sometimes we have to be pragmatic. We have to install software from whatever source is provided by the author. For me I like to support things I believe in. That is just me. Not everyone can do that because of work reasons, or they just don't care. If that is you no worries, but just wanted to share my point of view on this and maybe help others that ran into this issue.
Thanks for readying.