Hello guys, I and some other people have created bug reports for snap and I think these bug reports need more eyeballs.
Bug #2017926 "Unused content snaps not autoremoved"
Bug #2018626 "Unused dependencies not removed when uninstalling a snap program"
Bug #2018627 "[Feature Rquest] '--no-cache' command to not cache during uninstallation of snaps"
I don't really have a problem with Canonical forcing snap on it's users, but I do have a problem if the snap platform isn't ready and it's being forced on us, and it's not ready based on the problems I experienced. I really want to love and use snaps, but Canonical needs to fix these issues:
1. Uninstalling snaps is a pain in the ass. In apt and flatpak, they have options to auto-remove the software and it's dependencies, but snap doesn't have that, you have to know beforehand what snaps were installed alongside the main snap and one by one uninstall these snaps.
As a test, I've installed KompoZer. Before I installed KompoZer, this is what my snap list output looks like:
Code:
Name Version Rev Tracking Publisher Notes
bare 1.0 5 latest/stable canonical✓ base
core 16-2.58.3 14946 latest/stable canonical✓ core
core20 20230404 1879 latest/stable canonical✓ base
firefox 112.0.2-1 2605 latest/stable/… mozilla✓ -
gnome-3-38-2004 0+git.6f39565 140 latest/stable canonical✓ -
gtk-common-themes 0.1-81-g442e511 1535 latest/stable/… canonical✓ -
snapd 2.59.1 18933 latest/stable canonical✓ snapd
After I installed KompoZer, these dependencies were installed: core18 and gtk2-common-themes.
After I uninstalled KompoZer, the dependencies for KompoZer were still listed in `snap list`:
Code:
Name Version Rev Tracking Publisher Notes
bare 1.0 5 latest/stable canonical✓ base
core 16-2.58.3 14946 latest/stable canonical✓ core
core18 20230320 2721 latest/stable canonical✓ base
core20 20230404 1879 latest/stable canonical✓ base
firefox 112.0.2-1 2605 latest/stable/… mozilla✓ -
gnome-3-38-2004 0+git.6f39565 140 latest/stable/… canonical✓ -
gtk-common-themes 0.1-81-g442e511 1535 latest/stable/… canonical✓ -
gtk2-common-themes 0.1 13 latest/stable canonical✓ -
snapd 2.59.1 18933 latest/stable canonical✓ snapd
Snap leaves behind unused dependencies. Snap doesn't have an auto-remove unused dependencies command, you have to remember what dependencies were installed and remove them one by one, which leads me to my second problem.
2. No history.log for snaps. Apt has history.log, which records what dependencies were installed alongside the software, which I use as a reference in uninstalling software and it's dependencies, in snap, you have to do this manually:
Code:
sudo snap install kompozer && snap tasks --last=install --abs-time >> /home/ardouronerous/.snap_history.log
This command will create a log file that will tell me what dependencies were installed alongside KompoZer, so if I want to uninstall KompoZer, I can uninstall it and all it's unused dependencies using this log file as reference.
A log file should be created by default without user intervention.
3. Snap keeps a cache of uninstalled software so you don't have to download the snaps if you decide to reinstall. You could see this as a feature, but if you are low on disk space, this becomes a problem. I wish there was an option not to cache during uninstall.
As noted in this AskUbuntu post: https://askubuntu.com/questions/1075...aps-from-cache
Snap keeps a cache of uninstalled software so you don't have to download the snaps if you decide to reinstall. While I can see this as a useful feature, but this becomes an issue if you are low on disk space, to remedy this issue, some users, as noted in the AskUbuntu post, have to run this command in the Terminal to clear the snap cache:
Code:
sudo sh -c 'rm -rf /var/lib/snapd/cache/*'
This cleared about 2GB of space for me. A '--no-cache' command to not cache during uninstallation of a snap should be an option for users who are low on disk space.
Bookmarks