Saturday, May 4, 2024
 Popular · Latest · Hot · Upcoming
7
rated 0 times [  7] [ 0]  / answers: 1 / hits: 1987  / 3 Years ago, thu, september 9, 2021, 3:29:59

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


More From » 20.04

 Answers
2

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/* 

[#868] Saturday, September 11, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
shadowoof

Total Points: 293
Total Questions: 112
Total Answers: 137

Location: Burkina Faso
Member since Sun, Nov 21, 2021
3 Years ago
;