Skip to content

Commit

Permalink
content-update
Browse files Browse the repository at this point in the history
  • Loading branch information
BitwiseOperator committed Oct 14, 2024
1 parent 90622d8 commit c693315
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
!!! info ""

![linux_lock_s987yn7hs](linux_lock_s987yn7hs.png)

!!! warning ""

### Method #1: Check for Running Processes

```bash
ps aux | grep -i apt
ps aux | grep -i dpkg
```

![linux_lock_s987yn7hs-2](linux_lock_s987yn7hs-2.png)

You could terminate the process using

```bash
sudo kill <PID>
# from above picture PID is second col from left. PID is 7991 and 7993 [Yours will be different]
```

### Method #2: Remove Lock Files Manually

!!! warning ""

Run the below commands and then attempt to run `sudo apt update`

```bash
sudo rm /var/lib/apt/lists/lock
sudo rm /var/cache/apt/archives/lock
sudo rm /var/lib/dpkg/lock
sudo rm /var/lib/dpkg/lock-frontend
```

Above should solve the problem, but if doesn't, run `sudo dpkg --configure -a` then try to `sudo apt update`
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit c693315

Please sign in to comment.