[lxc-users] How to list all available templates in LXC?

Fajar A. Nugraha list at fajar.net
Fri Dec 11 22:31:21 UTC 2015


On Sat, Dec 12, 2015 at 1:23 AM, Eax Melanhovich <afiskon at devzen.ru> wrote:

> Hello.
>
> I would like to have a command like lxc-ls, but for templates, i.e.
>

ls /usr/share/lxc/templates/



> which allows to show all available templates with corresponding status
> (downloaded / not downloaded).



list all available images from download template:
/usr/share/lxc/templates/lxc-download -l

Listing all downloaded templates (including cached rootfs created by
os-specific templates):
ls -d /var/cache/lxc/*/*/*

Note that some templates (e.g. download template) will check whether your
cache is up-to-date, and if not, will download a new version next time you
use that template.



> Also it would be nice to have a command
> for removing downloaded templates.
>
>

rm -rf /var/cache/lxc/TEMPLATE/DISTRO_OR_VERSION

-- 
Fajar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20151212/e8de9b5c/attachment.html>


More information about the lxc-users mailing list