Facebook Twitter Instagram
    TecAdmin
    • Home
    • Ubuntu 20.04
      • Upgrade Ubuntu
      • Install Java
      • Install Node.js
      • Install Docker
      • Install LAMP Stack
    • Tutorials
      • AWS
      • Shell Scripting
      • Docker
      • Git
      • MongoDB
    • FeedBack
    • Submit Article
    • About Us
    Facebook Twitter Instagram
    TecAdmin
    Home»Linux Tutorials»How to Search, Pull, List & Delete Docker Images on Linux

    How to Search, Pull, List & Delete Docker Images on Linux

    RahulBy RahulMarch 4, 20162 Mins Read

    In our previous tutorials you have learned about installation of Docker engine on CentOS/RHEL and Ubuntu operating system and pulled images from Docker hub. After that created containers with images. This tutorial will help you to search, pull, list and delete Docker images from your host system.

    Search Docker Images

    First of all search Docker container images from Docker hub. For example, below command will search all images with Ubuntu and list as output

    # docker search ubuntu
    

    The result will look like below

    NAME                              DESCRIPTION          STARS     OFFICIAL   AUTOMATED
    
    ubuntu                            Ubuntu is a Deb...   3318      [OK]
    ubuntu-upstart                    Upstart is an e...   60        [OK]
    torusware/speedus-ubuntu          Always updated ...   25                   [OK]
    ubuntu-debootstrap                debootstrap --v...   24        [OK]
    rastasheep/ubuntu-sshd            Dockerized SSH ...   22                   [OK]
    neurodebian                       NeuroDebian pro...   17        [OK]
    nuagebec/ubuntu                   Simple always u...   4                    [OK]
    nickistre/ubuntu-lamp-wordpress   LAMP on Ubuntu ...   4                    [OK]
    nimmis/ubuntu                     This is a docke...   3                    [OK]
    
    

    Pull Docker Images

    Now pull required docker image from docker hub on your local system using following commands. Below command will download image named “ubuntu”.

    # docker pull ubuntu
    
    latest: Pulling from library/ubuntu
    
    fa5be2806d4c: Pull complete
    b4af4261cb15: Downloading [==>               ] 3.779 MB/70.55 MB
    5d358abc5d9c: Download complete
    2933d50b9f77: Download complete
    

    We are also downloading centos images from docker hub.

    # docker pull centos
    

    List Docker Images

    Now make sure that above images has been downloaded successfully on your system. Below command list all images.

    # docker images
    
    REPOSITORY  TAG         IMAGE ID          CREATED           VIRTUAL SIZE
    ubuntu      latest      36248ae4a9ac      2 hours ago       188 MB
    centos      latest      2933d50b9f77      2 hours ago       196.6 MB
    

    Remove Docker Images

    To remove an images, Docker provides rmi option. Using this we can delete any docker images from our local system. For example use below command with changing IMAGE ID with your Docker image id.

    # docker rmi  <IMAGE ID>
    

    or you can simply remove images using repository name (image name)

    # docker rmi ubuntu
    

    In case you have two images with same name, add tag name while deletion

    # docker rmi  ubuntu:latest
    
    Docker Docker Images
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email WhatsApp
    Previous ArticleHow to Move Docker Images between Hosts
    Next Article How to Create, List & Delete Docker Containers on Linux

    Related Posts

    What is the /etc/aliases file

    2 Mins Read

    What is the /etc/nsswitch.conf file in Linux

    2 Mins Read

    How to Setup Squid Proxy Server on Ubuntu and Debian

    Updated:June 17, 20225 Mins Read

    How to Delete a Let’s Encrypt Certificate using Certbot

    Updated:June 3, 20222 Mins Read

    How to Install Latest Git on Ubuntu 22.04

    Updated:May 31, 20222 Mins Read

    How To Install LibreOffice on Ubuntu 22.04

    Updated:May 23, 20222 Mins Read

    Leave A Reply Cancel Reply

    Recent Posts
    • What is CPU? – Definition, Types and Parts
    • What is the /etc/aliases file
    • What is the /etc/nsswitch.conf file in Linux
    • How to Install Ionic Framework on Ubuntu 22.04
    • What is the /etc/hosts file in Linux
    Facebook Twitter Instagram Pinterest
    © 2022 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.