Discussion - Docker prune cron job or menu option. | PlexGuide.com

Discussion Docker prune cron job or menu option.

  • Stop using Chrome! Download the Brave Browser via >>> [Brave.com]
    It's a forked version of Chrome with native ad-blockers and Google's spyware stripped out! Download for Mac, Windows, Android, and Linux!
Welcome to the PlexGuide.com
Serving the Community since 2016!
Register Now

barryclamsworth

Governer
Original poster
Donor
Feb 2, 2018
302
158
I freshly installed my server about a month ago and cleared out all my unused old docker images today. Reclaimed about 40GB. This could be fairly significant for those on a bottom end budget VPS.

Perhaps there is a built in docker space saving limit but if not it might be nice for a monthly cron job or something to remove these unused images or perhaps a menu item in plexguide for those with cmdlinephobia.

sudo docker image prune -a
 
  • Like
Reactions: 1 user

Deiteq

Administrator
Project Manager
Jan 19, 2018
283
112
Awesome fix!
Thanks for that!:D
Maybe throw it in with watchtower if not on it's own cron job!:geek:

docker-purge.JPG
 

FeralF

Citizen+
Staff
Donor
May 30, 2018
26
6
I freshly installed my server about a month ago and cleared out all my unused old docker images today. Reclaimed about 40GB. This could be fairly significant for those on a bottom end budget VPS.

Perhaps there is a built in docker space saving limit but if not it might be nice for a monthly cron job or something to remove these unused images or perhaps a menu item in plexguide for those with cmdlinephobia.

sudo docker image prune -a
Absolute legend. Was deleting them manually the other day, feels like a right div now. Big up on the big help ?
 

Deiteq

Administrator
Project Manager
Jan 19, 2018
283
112

Deiteq

Administrator
Project Manager
Jan 19, 2018
283
112
You will have to update to dev first then run:
sudo ansible-playbook /opt/plexguide/ansible/critical.yml --tags alias
to make sure the aliases get updated if PlexGuide didn't ask you to reinstall!;)


After that the new shortcut commands will work!

UPDATE: You now only need to sudo pgdev for the preinstaller to run so alias gets updated!:)
 
Last edited:
  • Like
Reactions: 1 users

Admin9705

Administrator
Project Manager
Donor
Jan 17, 2018
5,156
2,112
@Deiteq looks like u got that figured :D
 
  • Like
Reactions: 1 user

Indagatrix

Citizen
Jun 7, 2018
13
4
What lookup can i make to determine what is "unused"?
Is it trash from removing opt/appdata installs or am i on the wrong thought train?
 

Deiteq

Administrator
Project Manager
Jan 19, 2018
283
112
What lookup can i make to determine what is "unused"?
Is it trash from removing opt/appdata installs or am i on the wrong thought train?
Are you referring to prune or autoremove?
 

Deiteq

Administrator
Project Manager
Jan 19, 2018
283
112
prune removes old container images that are not being used due to updates or use of another maintainers container!
 
Last edited:

barryclamsworth

Governer
Original poster
Donor
Feb 2, 2018
302
158
What lookup can i make to determine what is "unused"?
Prune will only delete things that aren't in use by a container, it's sort of like a file lock when a file is in use. You can view all images and their status in portainer.

Or from the command line...

sudo docker ps -a - Show images and status (stretch your window out wide and re-run if using putty)

You can remove individual images using their IMAGE ID.

sudo docker rmi (image ID) - The rmi = ReMove Image
 
  • Like
Reactions: 1 user

scheerer

Citizen
Jan 4, 2019
3
1
Thankfully I had a large drive on my VPS (1TB), but over the past 18 months it has been slowly filling up and was using in the region of 495GB of space.

I have just run the command

sudo docker image prune -a
...and now I have recovered 475GB of space, that is just unbelievable, thanks Barry.
 

Admin9705

Administrator
Project Manager
Donor
Jan 17, 2018
5,156
2,112
thanks for the reminder. will add.
 
  • Like
Reactions: 1 user

Recommend NewsGroups

      Up To a 58% Discount!

Trending