www/content/blog/debian/force-package-removal.md

17 lines
527 B
Markdown
Raw Normal View History

2020-04-28 17:29:52 +02:00
---
title: "Force package removal"
date: 2015-01-27
description: How to force the removal of a package on Debian
tags:
2021-03-11 23:15:31 +01:00
- Debian
2020-04-28 17:29:52 +02:00
---
## How to force the removal of a package
2020-04-28 17:29:52 +02:00
Here is how to force package removal when post-uninstall script fails :
```sh
2020-04-28 17:29:52 +02:00
dpkg --purge --force-all <package>
```
2020-04-28 17:29:52 +02:00
There is another option if you need to be smarter or if it is a pre-uninstall script that fails. Look at `/var/lib/dpkg/info/<package>.*inst`, locate the line that fails, comment it out and try to purge again. Repeat until success!