17
14

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

/var/lib/docker/を削除してdockerを初期化

Last updated at Posted at 2014-10-26

dockerを初期化

  • docker ps -a
  • docker images

が増えすぎて初期化したくなることがある。
その場合、/var/lib/docker/を削除すればよい。

pacman -R docker
reboot
rm -rf /var/lib/docker/
pacman -Sy docker
systemctl enable docker
systemctl start docker

docker ps -a が多い場合は

~/.bashrc
dcleanall() {
    for c in `sudo docker ps -a | awk '/^[^C]/{print $1}'`
    do
        sudo docker rm -f $c
    done
}

dcleanallすればよい。

17
14
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
17
14

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?