Can't run yum update? - Could not create lock at /var/run/

I’m trying to run a system update from the command line and keep getting the following error

[[email protected] ~]# yum update -y
Loaded plugins: fastestmirror, versionlock
Could not create lock at /var/run/ [Errno 28] No space left on device

Can't create lock file; exiting
[[email protected] ~]# ^C
[[email protected] ~]# df -h
Filesystem                  Size  Used Avail Use% Mounted on
/dev/mapper/SangomaVG-root  207G  8.9G  198G   5% /
devtmpfs                    1.9G     0  1.9G   0% /dev
tmpfs                       1.9G   16K  1.9G   1% /dev/shm
tmpfs                       1.9G  1.9G     0 100% /run
tmpfs                       1.9G     0  1.9G   0% /sys/fs/cgroup
/dev/sda1                   1.9G  119M  1.7G   7% /boot
tmpfs                       378M     0  378M   0% /run/user/995
tmpfs                       378M     0  378M   0% /run/user/0
[[email protected] ~]# yum update -y
Loaded plugins: fastestmirror, versionlock
Could not create lock at /var/run/ [Errno 28] No space left on device

Clearly shown, you need to clean up /run (which is aliased as /var/run)

1 Like

Stupid question. How does one clean up /var/run

I can’t imagine I just start deleting objects. Thank you

That area should not have a lot of large files. Look around and see if there are any large files, maybe core dumps, which you could delete.

I could get rid of var/run/log which is 192M, that might be enough

If I’m not mistaken, a reboot should clear all of those tmpfs entries.

du -sh * while you are cd into /run may help you find the trouble.

When you see a large directory keep drilling down.

1 Like

Looks to be systemd and logs

[[email protected] run]# du -sh *
4.0K    asterisk
4.0K    avahi-daemon
8.0K    blkid
0       chrony
0       console
0       cron.reboot
0       dbus
0       dmeventd-client
0       dmeventd-server
4.0K    fail2ban
0       faillock
0       fop2.ctl
8.0K    httpd
4.0K    initramfs
0       lock
193M    log
0       lvm
4.0K    mariadb
0       mdadm
4.0K    mongodb
0       mount
0       netreport
0       openvpn-client
0       openvpn-server
4.0K    openvpn-server.log
0       plymouth
0       radiusd
0       redis
0       rpcbind
0       rpcbind.lock
0       rpcbind.sock
0       screen
0       sepermit
0       setrans
0       sudo
1.7G    systemd
4.0K    tmpfiles.d
4.0K    tuned
280K    udev
0       user
4.0K    utmp
0       wpa_supplicant
0       xtables.lock

Drill down into the systemd directory…

It is the sessions file

[[email protected] sessions]# cd /var/run/systemd
[[email protected] systemd]# du -sh *
0       ask-password
0       ask-password-block
0       cgroups-agent
12K     generator
24K     generator.late
0       inaccessible
0       initctl
4.0K    journal
0       machines
0       netif
0       notify
0       private
4.0K    readahead
4.0K    seats
1.7G    sessions
0       shutdown
0       shutdownd
272K    system
0       users

As @cynjut suggested, time to reboot.


This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.