To delete all your likes on X (formerly Twitter):
- Open your X (Twitter) profile in your browser.
- Navigate to the "Likes" tab.
- Open your browser's console:
- Chrome (macOS): ⌥ (Option) + ⌘ (Command) + J
- Firefox (macOS): Shift + ⌘ (Command) + J
- Chrome/Firefox (Windows): Shift + CTRL + J
- Copy and paste the following code into the console, then press Enter to run it.
The script will begin deleting your likes one by one.
setInterval(() => {
const posts = document.querySelectorAll('[data-testid="unlike"]');
const post = Array.from(posts).find((p) => !p.dataset.processed);
if (post) {
post.scrollIntoView({ behavior: 'smooth', block: 'center' });
post.click();
post.dataset.processed = 'true';
} else {
console.log('No post left to unlike.')
}
}, 1500);