How To Install stargz-snapshotter on Debian 12

Learn how to install stargz-snapshotter on Debian 12 with this tutorial. stargz-snapshotter is Fast container image distribution plugin with lazy pulling (program)

Introduction

In this tutorial we learn how to install stargz-snapshotter on Debian 12.

What is stargz-snapshotter

stargz-snapshotter is:

Pulling image is one of the time-consuming steps in the container lifecycle. Stargz Snapshotter is an implementation of snapshotter which aims to solve this problem by lazy pulling. Lazy pulling here means a container can run without waiting for the pull completion of the image and necessary chunks of the image are fetched on-demand.

eStargz is a lazily-pullable image format proposed by this project. This is compatible to OCI images so this can be pushed to standard container registries (e.g. ghcr.io) as well as this is still runnable even on eStargz-agnostic runtimes including Docker. eStargz format is based on stargz image format by CRFS but comes with additional features like runtime optimization and content verification.

This package contains the ctr-remote command.

There are three methods to install stargz-snapshotter on Debian 12. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install stargz-snapshotter Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install stargz-snapshotter using apt-get by running the following command:

sudo apt-get -y install stargz-snapshotter

Install stargz-snapshotter Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install stargz-snapshotter using apt by running the following command:

sudo apt -y install stargz-snapshotter

Install stargz-snapshotter Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Debian. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install stargz-snapshotter using aptitude by running the following command:

sudo aptitude -y install stargz-snapshotter

How To Uninstall stargz-snapshotter on Debian 12

To uninstall only the stargz-snapshotter package we can use the following command:

sudo apt-get remove stargz-snapshotter

Uninstall stargz-snapshotter And Its Dependencies

To uninstall stargz-snapshotter and its dependencies that are no longer needed by Debian 12, we can use the command below:

sudo apt-get -y autoremove stargz-snapshotter

Remove stargz-snapshotter Configurations and Data

To remove stargz-snapshotter configuration and data from Debian 12 we can use the following command:

sudo apt-get -y purge stargz-snapshotter

Remove stargz-snapshotter configuration, data, and all of its dependencies

We can use the following command to remove stargz-snapshotter configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge stargz-snapshotter

Dependencies

stargz-snapshotter have the following dependencies:

References

Summary

In this tutorial we learn how to install stargz-snapshotter package on Debian 12 using different package management tools: apt, apt-get and aptitude.