Added how to reconfigure a package

This commit is contained in:
Michele Cereda
2023-01-30 12:59:09 +01:00
parent 3cc22ca7f5
commit e2c5b71575
2 changed files with 26 additions and 1 deletions

View File

@@ -51,6 +51,7 @@ sudo apt-mark auto $(sudo apt-mark showmanual)
# Reconfigure packages.
sudo dpkg-reconfigure 'mariadb-server'
sudo dpkg-reconfigure -p 'low' 'unattended-upgrades'
```
## Automate security upgrades
@@ -58,6 +59,9 @@ sudo dpkg-reconfigure 'mariadb-server'
Leverage `unattended-upgrades` for this.
```sh
# Configure the packages to keep up to date.
sudo dpkg-reconfigure -p 'low' 'unattended-upgrades'
# Check what packages would be installed.
sudo unattended-upgrade -d --dry-run
@@ -65,6 +69,19 @@ sudo unattended-upgrade -d --dry-run
sudo unattended-upgrade
```
## Troubleshooting
### Fix a "Problem with MergeList" or "status file could not be parsed" error
> E: Encountered a section with no Package: header
> E: Problem with MergeList /var/lib/apt/lists/deb.debian.org_debian_dists_bullseye_main_i18n_Translation-en
> E: The package lists or status file could not be parsed or opened.
```sh
sudo rm -vrf '/var/lib/apt/lists/'*
sudo apt update
```
## Further readings
- [Apt configuration]
@@ -72,8 +89,13 @@ sudo unattended-upgrade
- [Unattended Upgrades]
- [cheat.sh]
## Sources
- [Fix a "Problem with MergeList" or "status file could not be parsed" error]
<!-- external references -->
[apt configuration]: https://wiki.debian.org/AptConfiguration
[configuring apt sources]: https://wiki.debian.org/SourcesList
[unattended upgrades]: https://wiki.debian.org/UnattendedUpgrades
[cheat.sh]:
[cheat.sh]: https://cheat.sh/apt
[fix a "problem with mergelist" or "status file could not be parsed" error]: https://askubuntu.com/questions/30072/how-do-i-fix-a-problem-with-mergelist-or-status-file-could-not-be-parsed-err#30199

View File

@@ -3,6 +3,9 @@
## TL;DR
```sh
# Reconfigure a package.
dpkg-reconfigure --priority low unattended-upgrades
# add an extra architecture
dpkg --add-architecture i386