Score:4

How to list the size of each installed snap package in Ubuntu 20.04?

cn flag

How does a user list the size of each installed snap package in Ubuntu 20.04? The purpose is to get an overview perspective of the disk space utilised by each installed snap package. The command snap list does not do this. Also, the app Disk Usage Analyzer could not show further than /var/lib/snapd/snaps.

disk usage analyzer

Score:2
my flag

All the snap packages are stored in /var/lib/snapd/snaps/. This directory contains all the revisions and names of the snap packages. You can run ls in the directory to list all the snap packages. Using -lh argument with ls will give you a more detailed output along with the size of the packages (and each of it's revisions). Thus, you can run the following command to list all the snap packages along with their installed size:

ls -lh /var/lib/snapd/snaps/

Alternatively, you can use the du command with -hcs argument to list the size of all the installed packages:

du -hcs /var/lib/snapd/snaps/* 
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.