Mark all autoremovable packages as manually-installed in one command

Clash Royale CLAN TAG#URR8PPP
up vote
1
down vote
favorite
I have many packages that are marked as autoremovable. I want to mark them as manually-installed, so that they are no longer autoremovable.
I can do it one package at-a-time using
sudo apt-mark manual <package name>
But how can I do it for all of the packages in one go, without typing all of the package names.
An answer to this question describes how to mark all automatically-installed packages as manually-installed, but I want to mark only the autoremovable packages.
ubuntu apt package-management
add a comment |Â
up vote
1
down vote
favorite
I have many packages that are marked as autoremovable. I want to mark them as manually-installed, so that they are no longer autoremovable.
I can do it one package at-a-time using
sudo apt-mark manual <package name>
But how can I do it for all of the packages in one go, without typing all of the package names.
An answer to this question describes how to mark all automatically-installed packages as manually-installed, but I want to mark only the autoremovable packages.
ubuntu apt package-management
add a comment |Â
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I have many packages that are marked as autoremovable. I want to mark them as manually-installed, so that they are no longer autoremovable.
I can do it one package at-a-time using
sudo apt-mark manual <package name>
But how can I do it for all of the packages in one go, without typing all of the package names.
An answer to this question describes how to mark all automatically-installed packages as manually-installed, but I want to mark only the autoremovable packages.
ubuntu apt package-management
I have many packages that are marked as autoremovable. I want to mark them as manually-installed, so that they are no longer autoremovable.
I can do it one package at-a-time using
sudo apt-mark manual <package name>
But how can I do it for all of the packages in one go, without typing all of the package names.
An answer to this question describes how to mark all automatically-installed packages as manually-installed, but I want to mark only the autoremovable packages.
ubuntu apt package-management
edited Jun 7 at 13:29
asked Jun 7 at 13:15
EmmaV
9691028
9691028
add a comment |Â
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
3
down vote
accepted
You can specify multiple package names as arguments to apt-mark manual:
sudo apt-mark manual package1 package2 package3
This will mark all those packages as manually installed.
Thus
sudo apt-mark manual $(sudo apt-get -s autoremove 2>/dev/null | awk '/^Remv / print $2 ')
will mark all packages which are auto-removable as manually installed.
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
3
down vote
accepted
You can specify multiple package names as arguments to apt-mark manual:
sudo apt-mark manual package1 package2 package3
This will mark all those packages as manually installed.
Thus
sudo apt-mark manual $(sudo apt-get -s autoremove 2>/dev/null | awk '/^Remv / print $2 ')
will mark all packages which are auto-removable as manually installed.
add a comment |Â
up vote
3
down vote
accepted
You can specify multiple package names as arguments to apt-mark manual:
sudo apt-mark manual package1 package2 package3
This will mark all those packages as manually installed.
Thus
sudo apt-mark manual $(sudo apt-get -s autoremove 2>/dev/null | awk '/^Remv / print $2 ')
will mark all packages which are auto-removable as manually installed.
add a comment |Â
up vote
3
down vote
accepted
up vote
3
down vote
accepted
You can specify multiple package names as arguments to apt-mark manual:
sudo apt-mark manual package1 package2 package3
This will mark all those packages as manually installed.
Thus
sudo apt-mark manual $(sudo apt-get -s autoremove 2>/dev/null | awk '/^Remv / print $2 ')
will mark all packages which are auto-removable as manually installed.
You can specify multiple package names as arguments to apt-mark manual:
sudo apt-mark manual package1 package2 package3
This will mark all those packages as manually installed.
Thus
sudo apt-mark manual $(sudo apt-get -s autoremove 2>/dev/null | awk '/^Remv / print $2 ')
will mark all packages which are auto-removable as manually installed.
edited Jun 7 at 13:23
answered Jun 7 at 13:18
Stephen Kitt
139k22301363
139k22301363
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f448420%2fmark-all-autoremovable-packages-as-manually-installed-in-one-command%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password