A new package management approach
Seasoned Ubuntu users have been quite familiar and comfortable using apt and its front-ends to install deb packages on their systems. But Ubuntu is slowly changing the time tested packaging system to something new named “snappy”. The nomenclature is supposed to indicate the speed improvement this new packaging system brings. According to the Ubuntu Developer website: Snappy is meant to increase security by means of isolation. Each application and system component will essentially “sit” in its own container. The OS and application files are kept perfectly separate while they remain read-only, meaning they cannot be tampered with. Apart from increased security, snappy will make both system and application updates easier. The new approach offers “transactional” image-based updates, meaning that an update will either entirely succeed or entirely fail, so no more partial updates leaving systems broken. This would definitely make system maintenance much more reliable, faster and easier for the end user and developer alike.
Snappy Desktops?
Even as early adopters try to wrap their heads around what snappy means for them and how to make the best of it, Ubuntu has announced that by 15.10, a new, snappy-based desktop image should be available for download. This, of course, raised even more questions, mostly about the future availability of deb packages and Ubuntu’s relationship with Debian, upon which it is still based. If you are familiar with apt and use it on your desktop PC or laptop, you can sit back and relax: You need not transition to snappy if you do not want to, at least not for a few years. Ubuntu is making snappy available as a separate spin for its 15.10 “Wiliy Werewolf,” while the main strand will likely remain deb-based. As from 16.04 onwards, Canonical’s plans are to transition into using snappy more and more. Of course, 16.04 will be the next LTS release, and for this, Canonical is not planning to discontinue using debs: You will be able to choose between a deb and snappy-based system. With 16.04’s three-year support cycle, your debs will be guaranteed to work well into 2019. That said, the base system of newer iterations of Ubuntu Desktop will likely remain Debian-based; there are no plans to make everything “snappy” just yet.
Trying out snappy
To have a first “feel” for snappy, if you cannot wait for the 15.10 release, you can give Snappy Ubuntu Core a try. Although the available system image is meant to run in the cloud, with Ubuntu’s instructions you can easily import it into a virtual machine, although it will need some preparing. Probably the easiest way to get Snappy is to try it through Vagrant; that makes deploying disposable Virtualbox images a breeze. First you need to install vagrant itself: Pick or create a directory where you’d like to deploy the Snappy virtual image. In this case, it will be “~/Snappy” First create the directory Then change it to The vagrant init command will place a “Vagrantfile” here. To prepare for deployment: The command will download a pre-built vagrant-enabled Snappy Ubuntu Core box and fire it up. (You can use the same command later to start up the box). You can log in with
Snappy basics
Once logged in, you can try how snappy works with the below basic functions First check the system version and basic info:
You will be presented with some minimal information about your system, including installed frameworks and applications. Ubuntu Snappy core is extensible with frameworks such as docker, upon which applications can be built. Installing frameworks and applications is as straightforward as it was with apt: will install the docker framework, while will install the “hello world” app by Canonical. There is no difference in the installation of frameworks and applications, they all come as “images.” You will also get a nice progress-bar:
Running snappy info again will reflect the changes.
To update the system, a single update command can be used, unlike previously updating (e.g. fetching updated package info) and upgrading (e.g. installing updated packages) as with apt. With snappy, it’s as simple as:
In this case, it has only updated a single package. To list the installed packages with version information, type It shows the minimal set of packages that are installed. It is interesting to note that the base system is present in only two packages, ubuntu-core and generic-amd64. Anything else there you must have installed yourself, or else it came with the virtual image.
The generic-amd64 package shows two versions here, 1.1 and 1.1.1. The asterik (*) beside 1.1.1 shows that this is the one that is actively used. To revert to the previous version, just use the rollback option: snappy list -v will show it has been successful:
Snappy also allows you to search for available packages, which at the time of writing are still rather scarce: or you can search for specific keywords, e.g.
To learn more about available snappy features, you can use its in-line help or refer to the tutorials on the Ubuntu Developer Website for more examples. Unfortunately man is not available on Snappy Ubuntu Core by default and there is no snappy package for man yet, so the more detailed man pages are yet to be seen. Once you have finished with Snappy Ubuntu Core, you can leave the virtual environment by typing and shut down the virtual Machine with To dispose of the Virtual machine use
Conclusion
Snappy offers a new approach towards Linux package management, simplifying updates, installations, enhancing security and making it easier for developers to provide everything in a single package that is needed for installation. Snappy is the beginning of something new that has the potential to change the way we think of and use our Ubuntu-based systems in the foreseeable future. While it feels novel and unusual, it is also quite easy and as ergonomic as a command line utility can get.