lk/distros/void/xbps.md

119 lines
1.4 KiB
Markdown
Raw Normal View History

2022-01-16 18:20:39 +00:00
---
title: "xbps"
2023-01-06 20:13:45 +00:00
tags: [ "Documentation", "Void" ]
2022-01-16 18:20:39 +00:00
---
2023-04-11 12:02:17 +00:00
## Search
2020-01-02 00:04:35 +00:00
2023-04-11 12:02:17 +00:00
Look for cowsay in the repository:
2020-01-02 00:04:35 +00:00
```bash
xbps-query --repository --search cowsay
```
2020-01-02 00:04:35 +00:00
2023-04-11 12:02:17 +00:00
Short version:
2020-01-02 00:04:35 +00:00
```bash
xbps-query -Rs cowsay
```
2020-01-02 00:04:35 +00:00
2023-04-11 12:02:17 +00:00
Search with regex:
2020-01-02 00:04:35 +00:00
```bash
xbps-query --regex -Rs 'cow(s)?\w'
```
2020-01-02 00:04:35 +00:00
2023-04-11 12:02:51 +00:00
![xbps searches](/tapes/xbps-query.gif)
2020-01-02 00:04:35 +00:00
List what's required for cowsay
```bash
xbps-query -x cowsay
```
2020-01-02 00:04:35 +00:00
2023-04-11 12:02:17 +00:00
What packages are orphaned (i.e. installed as a dependency for another package, which has since been removed)?
2020-01-02 00:04:35 +00:00
```bash
xbps-query -O
```
2020-01-02 00:04:35 +00:00
2023-04-11 12:02:17 +00:00
Show cowsay's dependencies.
2020-01-02 00:04:35 +00:00
```bash
xbps-query -x cowsay
```
2020-01-02 00:04:35 +00:00
2023-04-11 12:02:17 +00:00
This shows `perl`.
To see what else depends on perl:
2020-01-02 00:04:35 +00:00
```bash
xbps-query -X perl
```
2020-01-02 00:04:35 +00:00
2023-04-11 12:02:17 +00:00
List all manually installed software.
2020-01-02 00:04:35 +00:00
```bash
xbps-query -m
```
2020-01-02 00:04:35 +00:00
2023-04-11 12:02:17 +00:00
## Install
2020-01-02 00:04:35 +00:00
2023-04-11 12:02:17 +00:00
Install cowsay
2020-01-02 00:04:35 +00:00
```bash
xbps-install cowsay
```
2020-01-02 00:04:35 +00:00
2023-04-11 12:02:17 +00:00
Upgrade current packages.
`-R` looks at repositories, `-s` makes a sloppy search (for rough matches).
2020-01-02 00:04:35 +00:00
```bash
xbps-install -Suv
```
2020-01-02 00:04:35 +00:00
2023-04-11 12:02:51 +00:00
![xbps searches](/tapes/xbps-install.gif)
2023-04-11 12:02:17 +00:00
## Remove/ Uninstall
2020-01-02 00:04:35 +00:00
2023-04-11 12:02:17 +00:00
Remove cowsay
2022-11-06 13:28:09 +00:00
```bash
xbps-remove cowsay
```
2020-01-02 00:04:35 +00:00
2023-04-11 12:02:17 +00:00
...and all dependencies
2020-01-02 00:04:35 +00:00
```bash
xbps-remove -R cowsay
```
2020-01-02 00:04:35 +00:00
2023-04-11 12:02:17 +00:00
Remove all orphaned dependencies.
2020-01-02 00:04:35 +00:00
```bash
xbps-remove -o
```
2020-01-02 00:04:35 +00:00
2023-04-11 12:02:17 +00:00
Show information about cowsay
2020-01-02 00:04:35 +00:00
2023-04-11 12:02:51 +00:00
![xbps searches](/tapes/xbps-remove.gif)
2023-04-11 12:02:17 +00:00
## Fixes
2020-01-02 00:04:35 +00:00
2023-04-11 12:02:17 +00:00
Reinstall cowsay
2020-01-02 00:04:35 +00:00
```bash
xbps-install -f cowsay
```
2020-01-02 00:04:35 +00:00
Look for broken packages.
```bash
sudo xbps-pkgdb -a
```
2020-01-02 00:04:35 +00:00
2022-11-06 13:28:09 +00:00
And if you've found any, you might reconfigure all packages forcefully:
2020-01-02 00:04:35 +00:00
```bash
sudo xbps-reconfigure -af
```
2020-01-02 00:04:35 +00:00