Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an option to delete dependencies that are no longer required #776

Open
AKorezin opened this issue Mar 18, 2024 · 3 comments
Open

Add an option to delete dependencies that are no longer required #776

AKorezin opened this issue Mar 18, 2024 · 3 comments

Comments

@AKorezin
Copy link
Contributor

pikaur -Vq
Pikaur v1.18.4
Pacman v6.1.0 - libalpm v14.0.0 - pyalpm v0.10.6
Description:

I would like to see an option to delete packages when using pikaur -Qdt.

@actionless actionless changed the title Feature Request: Add an option to delete dependencies that are no longer required Add an option to delete dependencies that are no longer required May 4, 2024
@TheK0tYaRa
Copy link

You meant -Rs ?

@AKorezin
Copy link
Contributor Author

AKorezin commented Sep 5, 2024

https://github.com/archlinuxfr/yaourt/blob/fe1bcdd8610230bb75289f4b4c43607346ad18a9/src/lib/alpm_query.sh#L44-L53

# searching for packages installed as dependecy from another packages, but not required anymore
search_forgotten_orphans() {
	local answer

	AURSEARCH=0 search 0 1; ret=$?
	[[ ! $PKGSFOUND ]] && return $ret
	prompt "$(gettext 'Do you want to remove these packages (with -Rcs options) ? ') $(yes_no 2)"
	answer=$(userinput "YN" "N")
	[[ $answer = "Y" ]] && su_pacman -Rcs "${PKGSFOUND[@]#*/}"
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants